Bug 31114 - HSSFWorkbook(POIFSFileSystem fs) - constructor throwing exception
Summary: HSSFWorkbook(POIFSFileSystem fs) - constructor throwing exception
Status: REOPENED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC All
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 33951
  Show dependency tree
 
Reported: 2004-09-08 10:43 UTC by RANJINI
Modified: 2017-12-05 09:08 UTC (History)
0 users



Attachments
Attaching the spreadsheet exhibiting this behaviour. (67.00 KB, application/octet-stream)
2004-09-08 15:01 UTC, RANJINI
Details
Example file with exception (7.50 KB, application/octet-stream)
2017-12-05 09:07 UTC, vandrouny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RANJINI 2004-09-08 10:43:03 UTC
Hi,
   Im trying to get the number and names of the sheets in an XLS file.
To do this , i am trying to create an HSSFWorkBook by using the constructor 
HSSFWorkbook(POIFSFileSystem fs).

The exception i am getting is:
 java.lang.ArrayIndexOutOfBoundsException: 
24                                            
	at org.apache.poi.hssf.record.MulBlankRecord.getXFAt
(MulBlankRecord.java:171)      
	at org.apache.poi.hssf.record.RecordFactory.createRecord
(RecordFactory.java:315)   
	at org.apache.poi.hssf.record.RecordFactory.createRecords
(RecordFactory.java:193)  
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:207)        
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:174)
Comment 1 Avik Sengupta 2004-09-08 12:26:39 UTC
Please attach a small spreadsheet exhibiting this behaviour. 
Comment 2 RANJINI 2004-09-08 15:01:07 UTC
Created attachment 12672 [details]
Attaching the spreadsheet exhibiting this behaviour.
Comment 3 Jason Height 2005-07-29 04:43:15 UTC
Works for me with latest CVS version.

Jason
Comment 4 vandrouny 2017-12-05 09:07:39 UTC
Created attachment 35584 [details]
Example file with exception

java.lang.ArrayIndexOutOfBoundsException: 2
	at org.apache.poi.hssf.record.MulBlankRecord.getXFAt(MulBlankRecord.java:80)
	at org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.addMultipleBlanks(ValueRecordsAggregate.java:161)
	at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:93)
	at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:183)
	at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:122)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:367)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:413)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:394)
Comment 5 vandrouny 2017-12-05 09:08:45 UTC
The same bug with 3.17-FINAL.