https://issues.apache.org/bugzilla/show_bug.cgi?id=46918
Summary: RecordFormatException with Pivot table
Product: POI
Version: 3.5-dev
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
With a certain type of XLS data I get this exception:
Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException:
Unable to construct record instance
at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:71)
at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:254)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:373)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:277)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:202)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:184)
at ExcelExtractor.openWorkbook(ExcelExtractor.java:668)
at ExtractorTest.main(ExtractorTest.java:70)
Caused by: org.apache.poi.hssf.record.RecordFormatException: Not enough data
(0) to read requested (2) bytes
at
org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:185)
at
org.apache.poi.hssf.record.RecordInputStream.readUShort(RecordInputStream.java:230)
at
org.apache.poi.hssf.record.pivottable.ExtendedPivotTableViewFieldsRecord.<init>(ExtendedPivotTableViewFieldsRecord.java:53)
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:494)
at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:63)
... 7 more
Excel has no problem opening this file, POI 3.1 works fine on the input.
I checked with POI 3.5 latest svn March 26.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]