When attempting to load a file that is readable by 3.2, get the following stack trace: org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:226) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:352) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:276) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:201) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:183) ... Caused by: org.apache.poi.hssf.record.RecordFormatException: Expected to find a ContinueRecord in order to read remaining 65535 of 65535 chars at org.apache.poi.hssf.record.RecordInputStream.readStringCommon(RecordInputStream.java:318) at org.apache.poi.hssf.record.RecordInputStream.readUnicodeLEString(RecordInputStream.java:273) at org.apache.poi.hssf.record.pivottable.ExtendedPivotTableViewFieldsRecord.<init>(ExtendedPivotTableViewFieldsRecord.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:224) ... 42 more Unable to provide the data file, as it contains data that we cannot distribute, but if there is more info I can collect, happy to do so.
Can you re-test with a recent 3.5 nightly and see if it's fixed there or not? However, the stack trace does look like your file might be corrupt, or it's possible that the continue record is further from the original record than we expect it to be. Best to know if it's fixed first though
Fails with 3.5-beta5-20090219, I can't find a link to any nightly builds on the website, would I have to download and build from source? The file opens in Excel, OpenOffice and POI 3.2. It continues to fail to open even when I've deleted every sheet from the workbook, so it looks like it's hidden in the leftovers.
(In reply to comment #2) > Fails with 3.5-beta5-20090219, I can't find a link to any nightly builds on the > website, would I have to download and build from source? > And if so, should I just use trunk?
Daily builds can be downlaoded from http://encore.torchbox.com/poi-svn-build/ You say you can reproduce the trouble even if you delete all sheets from the workbook. Can you attach the leftovers? Yegor
It is fixed in poi-3.5-beta6-20090323.jar. A quick test suggests it was actually fixed in poi-3.5-beta6-20090212.jar (poi-3.5-beta6-20090211.jar fails). I was wrong about being able to reproduce with no sheets though, that was me not hitting refresh in Eclipse enough when testing... Thanks, I'll probably wait for beta 6 then.
This bug is a duplicate of bug 46693 It's often a good idea to first try searching for existing reports of the same bug, for example: http://www.google.com/search?q="Expected+to+find+a+ContinueRecord+in+order+to+read+remaining+65535+of+65535+chars" *** This bug has been marked as a duplicate of bug 46693 ***