Bug 47701 - POI 3.5 beta 7 can not read excel file contain list box (Form Control)
Summary: POI 3.5 beta 7 can not read excel file contain list box (Form Control)
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.5-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-18 01:42 UTC by Thang Nguyen
Modified: 2009-12-02 02:56 UTC (History)
0 users



Attachments
this is the file to test for list box contain. (17.50 KB, application/vnd.ms-excel)
2009-08-18 01:42 UTC, Thang Nguyen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thang Nguyen 2009-08-18 01:42:40 UTC
Created attachment 24143 [details]
this is the file to test for list box contain.

Hi EveryOne,

POI 3.5 beta 7 can't read an excel file (Office 2007) this contain 

a listbox Form Control. ( You can download excel attach file to run this test)

This is error message when I'm use poi read excel file:

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:65)
    at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:264)
    at
org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:267)
    at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:233)
    at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:378)
    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:318)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:299)
    at OFFCE129.main(OFFCE129.java:16)
Caused by: java.lang.RuntimeException: Unexpected end-of-file
    at
org.apache.poi.util.LittleEndianInputStream.checkEOF(LittleEndianInputStream.java:123)
    at
org.apache.poi.util.LittleEndianInputStream.readUShort(LittleEndianInputStream.java:118)
    at
org.apache.poi.hssf.record.SubRecord$LbsDataSubRecord.<init>(SubRecord.java:165)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:58)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:92)
    at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
    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:57)
    ... 9 more

Please help me a solution for this bug, 

If everyone has any Ideas, Please help me.

Thanks,
Comment 1 Yegor Kozlov 2009-12-02 02:56:21 UTC
Fixed in r886113

Yegor