Skip to content

Commit

Permalink
Add description of using ReadingOptions (to get format information)
Browse files Browse the repository at this point in the history
  • Loading branch information
darinkelkhoff committed Dec 26, 2024
1 parent 2bae338 commit e281669
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,22 @@ row.forEach(cell -> {
...
});
```

By default, format information is not read. To include it, call a `ReadableWorkbook` constructor that takes `ReadingOptions`:

```java
boolean withCellFormat = true; // If true, extract cell formatting
boolean cellInErrorIfParseError = true; // If true, cell type is ERROR if it is not possible to parse cell value
// If false, an exception is throw when there is a parsing error
ReadingOptions readingOptions = new ReadingOptions(withCellFormat, cellInErrorIfParseError);
try (ReadableWorkbook wb = new ReadableWorkbook(is, readingOptions)) {
```

## More Information
### Reading and Writing of encryption-protected documents

This project does not implement read-write encryption
protected excel documents, but it can be realized by combining `poi` and `poi-ooxml`.
This test class is a reference implementation :
[EncryptionTest](./e2e/src/test/java/org/dhatim/fastexcel/EncryptionTest.java)

0 comments on commit e281669

Please sign in to comment.