Attached to this bug report is a MS Excel spreadsheet, Project.xls, that is generated by a program called BRB ArrayTools. It parsed without complaint in POI 1.5.1, but in POI 2.5 it throws the following exception: org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance, the following exception occured: null at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:212) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:193) at test.TestProject.main(TestProject.java:9) Exception in thread "main" I will attach Project.xls, TestProject.java (exercises the bug), and out.txt (capture of the entire trace for the exception). -jw
Created attachment 11086 [details] MS Excel spreadsheet generated by BRB ArrayTools
Created attachment 11088 [details] short Java program to exercise the bug
Created attachment 11089 [details] capture of exception trace
I think this is the same bug as the one I submitted a week ago, bug# 27929. The problem with the xls file is the drop-down lists. I simplified my problem spreadsheet to just a simple drop-down list on one sheet and got the same exception. As a workaround, I modified the POI source to catch and ignore this particular exception, but this is obviously not a fix.
Nice find! My spreadsheet definitely has drop down lists, I may have some time in the next few days to take a closer look and try to corroborate what you are saying. At least we can potentially mark one of these bug reports as a dupe, although at a glance, the exception does not appear to be the same as yours. In either case, I'm not in a position right now to fix this bug myself, so the best I can do is provide good evidence and research for someone who _is_ in that position. :-) -jw
I have submitted a patch to fix bug 27929. If you apply that patch, the attached spreadsheet will work fine. I verified this patch on your sample file. So this bug can be marked duplicate.
As indicated by Michael, the bug is now corrected. This Bug just needs to be closed, which i am doing .... NOW Jason