Bug 31114

Summary: HSSFWorkbook(POIFSFileSystem fs) - constructor throwing exception
Product: POI Reporter: RANJINI <ranjini_n>
Component: HSSFAssignee: POI Developers List <dev>
Status: REOPENED ---    
Severity: major    
Priority: P3    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 33951    
Attachments: Attaching the spreadsheet exhibiting this behaviour.
Example file with exception

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.