commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Fischer ...@makii.de>
Subject Re: Exception On Instantiating HSSFWorkbook
Date Fri, 23 Sep 2005 19:28:00 GMT
Hi There,

On Fri, Sep 23, 2005 at 02:02:13PM -0000, animesh sonkar wrote:
> Hi,
> I have a following piece of code which gives me an exception.
> The details of exception are at the end.
> The code is as follows :
> /*
> * @param sXLSInputFileName   The location of the Excel file alongwith  * the file name
> */
> 1> FileInputStream fisInputFileStream = new    FileInputStream(sXLSInputFileName);
> 
> 2> POIFSFileSystem poiFSFileSystem = new POIFSFileSystem(fisInputFileStream);
> 
> 3>  HSSFWorkbook wbInputFile = new HSSFWorkbook(poiFSFileSystem);
> 
> I get an Exception for line number 3>HSSFWorkbook wbInputFile = new HSSFWorkbook(poiFSFileSystem);
> Please help me out I m in the middle of a delivery.
> 
>   
> java.lang.NullPointerException
> at org.apache.poi.hssf.record.SSTRecord.getString(SSTRecord.java:277)
> at org.apache.poi.hssf.model.Workbook.getSSTString(Workbook.java:649)
> at org.apache.poi.hssf.usermodel.HSSFCell.<init>(HSSFCell.java:283)
> at org.apache.poi.hssf.usermodel.HSSFRow.createCellFromRecord(HSSFRow.java:198)
> at org.apache.poi.hssf.usermodel.HSSFSheet.setPropertiesFromSheet(HSSFSheet.java:156)
> at org.apache.poi.hssf.usermodel.HSSFSheet.<init>(HSSFSheet.java:110)
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:177)
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:130)

Maybe you should try this on the POI User mailing list...

Cheers,
   Ralf

-- 
Ralf Fischer - me [on server] makii [single dot] de
Meet me at Linux Workshop Weekend 2005 @ Linux User Schwabach
http://lusc.de/dokuwiki/events/2005/workshopweekend2005

Mime
View raw message