Bug 11365

Summary: Error while openig Excel File
Product: POI Reporter: Guenter Porzer <guenter.porzer>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 1.5.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: The Excel File that fails to open

Description Guenter Porzer 2002-08-01 13:00:40 UTC
Hi,

I'm getting the Error below in response to open an Excel File with the following 
source:

<CODE>
POIFSFileSystem fs =  new POIFSFileSystem(  
                                     new FileInputStream("C:\\test\\test.xls"));
HSSFWorkbook hssfworkbook = new HSSFWorkbook(fs);
<END CODE>

<ERROR>
java.io.FileNotFoundException: no such entry: "Workbook"
        at 
org.apache.poi.poifs.filesystem.DirectoryNode.getEntry(DirectoryNode.java:282)
        at 
org.apache.poi.poifs.filesystem.POIFSFileSystem.createDocumentInputStream(POIFSF
ileSystem.java:356)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:139)
        at 
oekb.rm.portfolio.FtpExcelFileLoader.main(FtpExcelFileLoader.java:167)
Exception in thread "main" 
<END ERROR>

I'm not quite sure if this is my fault or a bug because the POI-Lib works fine 
on several Excel Files which I created with "Office XP". But on that particular 
one it fails. ( If you would like I can send you that file as attchment )

Thanks
Guenter
Comment 1 Guenter Porzer 2002-08-01 13:02:31 UTC
Created attachment 2555 [details]
The Excel File that fails to open
Comment 2 Andy Oliver 2002-08-01 14:12:22 UTC
This is a PRE-Excel 97 file.  Meaning it is in Excel 95 format (most likely). 
Look at it with org.apache.poi.poifs.dev.POIFSViewer and you'll see there is no
"Workbook" entry, its named "Book".  All XLS files after "Excel 95" use
"Workbook" to name the entry.  HSSF only supports 97 or later.  (Biff8)