Bug 57093 - LeftoverDataException: Initialisation of record 0x31 left 22 bytes remaining still to be read
Summary: LeftoverDataException: Initialisation of record 0x31 left 22 bytes remaining ...
Status: NEEDINFO
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.11-dev
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 57104
  Show dependency tree
 
Reported: 2014-10-14 18:54 UTC by Martin Studer
Modified: 2015-06-20 15:40 UTC (History)
0 users



Attachments
xls file which is causing the problem (4.50 KB, application/vnd.ms-excel)
2014-10-14 18:54 UTC, Martin Studer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Studer 2014-10-14 18:54:40 UTC
Created attachment 32111 [details]
xls file which is causing the problem

The attached file causes the following exception to be thrown:

LeftoverDataException: Initialisation of record 0x31 left 22 bytes remaining still to be read


org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0x31 left 22 bytes remaining still to be read.
	at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:156)
	at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:256)
	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 org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:84)
	at com.miraisolutions.xlconnect.Workbook.<init>(Workbook.java:92)
	at com.miraisolutions.xlconnect.Workbook.<init>(Workbook.java:99)
	at com.miraisolutions.xlconnect.Workbook.getWorkbook(Workbook.java:1300)
	at com.miraisolutions.xlconnect.Workbook.getWorkbook(Workbook.java:1318)
	at com.miraisolutions.xlconnect.integration.r.RWorkbookWrapper.<init>(RWorkbookWrapper.java:43)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at RJavaTools.newInstance(RJavaTools.java:352)
Comment 1 Dominik Stadler 2014-11-10 21:19:25 UTC
This error is quite similar to one of the cases in bug 57104, we verified there that POI complies to the Spec and the file may be not 100% built according to the spec. 

How did you produce this file? In MS Excel? OpenOffice? Or with some other software?
Comment 2 Martin Studer 2015-02-09 19:23:37 UTC
I got the file from another user which confirmed that it was produced in MS Excel.