Skip to content

Commit 92d8cfe

Browse files
authored
Merge pull request #507 from darinkelkhoff/master
Update README with description of using ReadingOptions (to get format information)
2 parents 0197f8c + e281669 commit 92d8cfe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,22 @@ row.forEach(cell -> {
383383
...
384384
});
385385
```
386+
387+
By default, format information is not read. To include it, call a `ReadableWorkbook` constructor that takes `ReadingOptions`:
388+
389+
```java
390+
boolean withCellFormat = true; // If true, extract cell formatting
391+
boolean cellInErrorIfParseError = true; // If true, cell type is ERROR if it is not possible to parse cell value
392+
// If false, an exception is throw when there is a parsing error
393+
ReadingOptions readingOptions = new ReadingOptions(withCellFormat, cellInErrorIfParseError);
394+
try (ReadableWorkbook wb = new ReadableWorkbook(is, readingOptions)) {
395+
```
396+
386397
## More Information
387398
### Reading and Writing of encryption-protected documents
388399

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

0 commit comments

Comments
 (0)