Bug 25183 - org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet NullPointerException
Summary: org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet NullPointerExc...
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.5.1
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-12-03 21:20 UTC by Sebastian
Modified: 2007-01-16 01:33 UTC (History)
0 users

Excel file that can't be opened (24.00 KB, application/vnd.ms-excel)
2003-12-03 21:34 UTC, Sebastian

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian 2003-12-03 21:20:58 UTC
When opening and Excel file I get this exception:

	at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet
	at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:134)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
        at gtisoft.ms.excel.ExHandler.open(ExHandler.java:45)

  The code that produces the error is:

	public HSSFWorkbook open(File f) throws FileNotFoundException, 
IOException {
		if (isOpened()) {
		_fStream    = new FileInputStream(f);
		_buffStream = new BufferedInputStream(_fStream);
                 POIFSFileSystem fs = new POIFSFileSystem( _buffStream );
                _wb = new HSSFWorkbook(fs);
		return _wb;
   I don't know how to attach the excel file here, can you show me how to do 
it?. If it can't be done I'd be more than happy to email it to you.

  I have downloaded and tested opening this file with POI 2.0-RC1 and it works 
correctly. At the current stage of my project I can't move to POI 2.0.
Comment 1 Sebastian 2003-12-03 21:34:55 UTC
Created attachment 9379 [details]
Excel file that can't be opened
Comment 2 Avik Sengupta 2007-01-16 01:33:28 UTC
Works as of 12Jan2007, Testcase added.