Bug 16488 - Unable to open written spreadsheet in Excel, but can in Open Office
Summary: Unable to open written spreadsheet in Excel, but can in Open Office
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: PC All
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-01-28 11:18 UTC by Christopher Barham
Modified: 2005-03-20 17:06 UTC (History)
0 users

java sourtce and excel template that shows problem (22.78 KB, application/octet-stream)
2003-01-28 11:19 UTC, Christopher Barham

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Barham 2003-01-28 11:18:44 UTC
Overview Description: Using a template spreadsheet, I add data to the
spreadsheet, but am then unable to open it in Excel 97SR2: Dialogue box error
"unmable to read file" .  I can open it in OpenOffice 1.0.1.

Steps to Reproduce: small example program and template is attached

I am attempting to read in a template file, add a bunch of data and then 
write it out to a new file.  This works fine under OpenOffice, I can open 
the generated file in sheet with no problems.  Using Excel though, I find 
that it will not open, giving the error dialogue box:
Unable to read file"

I'm using:
POI version 1.9.0-dev-2003-122
Excel  97Sr2
OpenOffice 1.0.1
Java - IBM SDK 1.3

The code I am running is adapted from the quick start developers pages:  I 
get the POIFSFileSystem from the template Excel xls file, grab the correct 
sheet in the workbook and write the data.  I then use the write method on 
HSSFWorkbook to write out the new POIFSFileSystem.

The template (input) spreadsheet has the following Entry objects in the 
found Entry: Workbook
found Entry: DocumentSummaryInformation
found Entry: SummaryInformation
found Entry: CompObj
found Entry: _VBA_PROJECT_CUR

The output file has matching entries, so I am assuming that nothing is 

The Excel files are to be used as described here: 
Comment 1 Christopher Barham 2003-01-28 11:19:40 UTC
Created attachment 4579 [details]
java sourtce and excel template that shows problem
Comment 2 Jan Tilo 2003-03-06 15:21:08 UTC
See Bug 17373.

I think the Problem might be the same.
Your Sheet contains unknow records, I think (red triangles)
Comment 3 Taneli Waltari 2003-04-05 10:02:33 UTC
The attached test doesnt work here either;
-Excel 2002 SP-2
-Sun J2RE 1.4.1_02
-POI 1.10.0-dev-20030222

Excel manages to open the file with lots of errors.
Comment 4 Jason Height 2003-10-14 22:03:48 UTC
I have run the test case against the latest 2.0 Branch in CVS and it works for me.

I am going to close this out but you may want to check for yourself that the 2.0
Branch works for you.