monitorjbl / excel-streaming-reader

An easy-to-use implementation of a streaming Excel reader using Apache POI
Apache License 2.0
946 stars 343 forks source link

Getting exception while creating cellstyle #180

Closed ghost closed 5 years ago

ghost commented 5 years ago

I am getting a problem when open a workbook and create style on a cell this give me an exception like this: com.monitorjbl.xlsx.impl.StreamingWorkbook.createCellStyle(StreamingWorkbook.java:275)

Here is my code: try (InputStream is = new FileInputStream(excelFile); Workbook workbook = StreamingReader.builder() .rowCacheSize(100).bufferSize(4096).open(is)) {

CellStyle dateCellStyle = workbook.createCellStyle(); dateCellStyle.setDataFormat((short) 14); }

Is setting style is not supported in this library ?

monitorjbl commented 5 years ago

No, this is a read-only library. You cannot modify the worksheet in any way.