I have an excel document that results in the following exception being thrown: Exception in thread "main" java.lang.NullPointerException at org.apache.poi.hssf.record.SSTRecord.getString(SSTRecord.java:313) at DoTest$TestHandler.processRecord(DoTest.java:26) at org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequ est.java:173) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEve nts(HSSFEventFactory.java:208) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSS FEventFactory.java:139) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEv ents(HSSFEventFactory.java:104) at DoTest.processFile(DoTest.java:49) at DoTest.main(DoTest.java:64) This happens for CVS HEAD, 2.0-pre3 and 1.5.1 (in 1.5.1 the NullPointer is in SSTRecord.java line 309 though). The excel document contains english and taiwanese texts. I cannot attach the document here due to NDA issues. If I do a search/replace on a simple string that occurs in the sheet, and saves it, the saved version works fine. But either way, the SSTRecord.getString(int) should not ever be able to result in a NPE, right?
Created attachment 8491 [details] Test case for POI 2
The SST deserialisation code has been rewritten. I suspect that this bug is long gone. Jason