Created attachment 32069 [details] sample saved with libreoffice 4.3 The following sample creates an exception wheh try to open it with POI The sample was created with libreoffice 4.3 If I open and save the sample file with msoffice and libreoffice 4.2, the test works I have tried versions 3.9, 3.10-final and 3.11-beta2 org.apache.poi.hssf.record.RecordFormatException: Leftover 486 bytes in subrecord data [15, 00, 12, 00, 19, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, DC, 1F, 7F, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, 00, 00, 00, 00, 00, 00, 00, 00, 02, 00, 00, 00, 03, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, 00, 00, 00, 00, 00, 00, 00, 00, FF, FF, FF, FF, FF, FF, FF, FF, 00, 00, 00, 00, FF, FF, FF, FF, E0, CF, 95, DC, 1F, 7F, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 77, EA, 07, 00, 00, 00, 04, 00, 02, 00, 00, 00, FF, FF, FF, FF, AC, A2, 85, 03, 00, 00, 00, 00, 00, 80, 01, 00, 00, 80, 00, 00, 00, 80, 01, 00, 00, 80, 13, 00, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, 01, 01, 00, 00, 00, 00, 00, 00, B8, 37, 79, EF, 1F, 7F, 00, 00, B8, 37, 79, EF, 1F, 7F, 00, 00, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF, FF] at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:110) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:87) at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:338) at org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:310) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:276) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:480) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:315) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:278) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:213) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:361) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342) at readers.xls.GenericXLSReader.open(GenericXLSReader.java:39)
It seems this file is actually corrupted, MS Excel also crashes when I try to open it, based on that this sounds more like a bug in LibreOffice...
For the records, Excel is not crashing always, but crashed once when I saved the file. I would expect that the file is not created 100% correctly by LibreOffice, but Excel can compensate usually, while POI actively refuses invalid content.
We are also having the same problem and want to know how to fix the issue. We have a excel template, and from our web application, we download the file (using POI) and enter data feed and submit for impor process. Testers have Libre Office to download the template, enter data and save it in FTP folder. When this process is done using LibreOffice 4.3.4.1, we get the above problem, where as with LibreOffice 3.7, this doesn't exist. Also, with MS excel also we dont see this problem