Bug 32822 - Error opening XL file with InputStream
Summary: Error opening XL file with InputStream
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC Windows 2000
: P1 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2004-12-23 08:27 UTC by password
Modified: 2005-04-22 03:41 UTC (History)
0 users

XL File that gives error (23.00 KB, application/vnd.ms-excel)
2004-12-23 08:29 UTC, password

Note You need to log in before you can comment on or make changes to this bug.
Description password 2004-12-23 08:27:58 UTC
I am getting error while opening xl file. Here is my code
FileInputStream inputStream  = new FileInputStream("c:\\TEST1.xls");
HSSFWorkbook workbook = new HSSFWorkbook(inputStream);

and ehere is exception I get 
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at org.apache.poi.hssf.record.RecordFactory.createRecord
	at org.apache.poi.hssf.record.RecordFactory.createRecords
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
	at com.dreyfus.client.ExcelClient.go2(ExcelClient.java:23)
	at com.dreyfus.client.ExcelClient.main(ExcelClient.java:18)
Caused by: java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.apache.poi.hssf.record.UnknownRecord.<init>
	at org.apache.poi.hssf.record.SubRecord.createSubRecord
	at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
	at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
	... 11 more
Error org.apache.poi.hssf.record.RecordFormatException: Unable to construct 
record instance, the following exception occured: null
Comment 1 password 2004-12-23 08:29:07 UTC
Created attachment 13829 [details]
XL File that gives error

This is the xl file that gives me error
Comment 2 password 2004-12-23 08:30:08 UTC
I had attached the xls file that gives error
Comment 3 Avik Sengupta 2005-04-22 11:41:05 UTC
This excel sheet works fine with CVS HEAD as of 22Apr2005. Added file as a
testcase (in o.a.p.hssf.usermodel.TestBugs) to prevent future regression