Summary: | Unable to read Excel file | ||
---|---|---|---|
Product: | POI | Reporter: | vdhanda |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | vdhanda |
Priority: | P2 | ||
Version: | 3.5-FINAL | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
Attachments: |
BiffViewer output
The Excel |
Description
vdhanda
2009-12-02 11:50:55 UTC
Created attachment 24662 [details]
The Excel
Can you please attach the stack-trace of your error? Also, can you investigate whether re-saving the file with Excel allows POI to read it? Hello Josh, Yes, if I open and save the file in Excel and/or OpenOffice, the POI can read it. The stack trace from BiffViewer is at the bottom of the BiffViewer output. Here's the stack trace from my application. 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:64) at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:263) at org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:270) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:236) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:377) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:275) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:200) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:182) at com.epistemic.http.ExcelHandler.handleResponseBody(ExcelHandler.java:126) at com.aexp.pl.Tester.main(Tester.java:17) Caused by: java.lang.RuntimeException: Unusual record size remaining=(0) at org.apache.poi.hssf.record.ColumnInfoRecord.<init>(ColumnInfoRecord.java:72) 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$ReflectionRecordCreator.create(RecordFactory.java:56) ... 9 more |