Trying to read the attached spreadsheet results in a NullPointerExcepion, apparently because convertLabelRecords passes a null string to the constructor of UnicodeString (see stack trace below). The problem seems to be related to a chart that relies on broken references to other spreadsheets. For my application's purposes, I've created a patch that replaces the null string with an empty one. This seems to work in the specific case, but doesn't seem like a good solution in general. java.lang.NullPointerException at org.apache.poi.hssf.record.UnicodeString.setString(UnicodeString.java:350) at org.apache.poi.hssf.record.UnicodeString.<init>(UnicodeString.java:104) at org.apache.poi.hssf.usermodel.HSSFWorkbook.convertLabelRecords(HSSFWorkbook.java:304) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:213) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:153) at tersus.poi.tests.ReadExcelFile.main(ReadExcelFile.java:32)
Created attachment 20305 [details] Test spreadsheet
Created attachment 20306 [details] Possible patch (probably not generally applicable)
Fixed in svn r653675. Trapped null a bit earlier (in LabelRecord's constructor) -used empty string instead. Added junit.
*** Bug 46575 has been marked as a duplicate of this bug. ***