excel-streaming-reader icon indicating copy to clipboard operation
excel-streaming-reader copied to clipboard

StreamingCell.getDateCellValue( ) JavaDoc error

Open gredler opened this issue 8 years ago • 3 comments

The JavaDoc for StreamingCell.getDateCellValue() states that it can throw an IllegalStateException, but I don't think this is actually possible.

https://github.com/monitorjbl/excel-streaming-reader/blob/master/src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java#L177

gredler avatar Sep 01 '16 14:09 gredler

I believe this exception bubbles up from the HSSFDateUtils.getJavaDate() call.

monitorjbl avatar Sep 01 '16 14:09 monitorjbl

I checked and didn't see anywhere in HSSFDateUtils that it might come from -- but I could have missed something.

gredler avatar Sep 01 '16 14:09 gredler

Sorry for the delay in responding, I got married in October and then the holidays took most of my free time away. I looked into this and you are correct. The method is supposed to throw an exception when the cell type is CELL_TYPE_STRING. I added that in and it will be present in the next release.

monitorjbl avatar Jan 17 '17 00:01 monitorjbl