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 Detail: 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 POIFSFileSystem: 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 missing. The Excel files are to be used as described here: http://www.doh.gov.uk/bulkloading.htm
Created attachment 4579 [details] java sourtce and excel template that shows problem
See Bug 17373. I think the Problem might be the same. Your Sheet contains unknow records, I think (red triangles)
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.
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. Jason