|Summary:||Code example on site crashes|
|Component:||XSSF||Assignee:||POI Developers List <dev>|
Description tim 2011-08-18 19:55:45 UTC
On the following page: http://poi.apache.org/spreadsheet/how-to.html There is an XSSF code sample titled "XSSF and SAX (Event API)". In the SheetHandler class the endElement method is missing code to unset the nextIsString flag. It must be unset inside the "if(nextIsString)" block or the code will crash on the first cell after it reads a string since it will use the stale data in lastContents variable and try to parse it as an Integer. This may not happen on all spreadsheets but it happened on the first one that I tried so YMMV. Either way I think the fix is valid.