Bug 31114 - HSSFWorkbook(POIFSFileSystem fs) - constructor throwing exception
Summary: HSSFWorkbook(POIFSFileSystem fs) - constructor throwing exception
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
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

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

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
   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:
	at org.apache.poi.hssf.record.MulBlankRecord.getXFAt
	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>
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.

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.