Bug 16716 - open/save sheet problem File Error; Some digit formats may be lost;
Summary: open/save sheet problem File Error; Some digit formats may be lost;
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC All
: P3 normal with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2003-02-03 16:07 UTC by Wojtek Konieczka
Modified: 2005-03-20 17:06 UTC (History)
1 user (show)

sheet I used to try the example (14.50 KB, application/octet-stream)
2003-02-04 12:27 UTC, Wojtek Konieczka
zipped servlet's source and the class file (2.71 KB, application/octet-stream)
2003-02-04 14:02 UTC, Wojtek Konieczka
Correctly re-written file (16.00 KB, application/vnd.ms-excel)
2003-11-03 17:51 UTC, Avik Sengupta

Note You need to log in before you can comment on or make changes to this bug.
Description Wojtek Konieczka 2003-02-03 16:07:08 UTC
I tried to use an example from quick-guide section:

Reading and Rewriting Workbooks
    POIFSFileSystem fs      =
            new POIFSFileSystem(new FileInputStream("workbook.xls"));
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    HSSFSheet sheet = wb.getSheetAt(0);
    HSSFRow row = sheet.getRow(2);
    HSSFCell cell = row.getCell((short)3);
    if (cell == null)
        cell = row.createCell((short)3);
    cell.setCellValue("a test");

    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");

opening and saving went ok, but when I opened xls file (with Excel) I got th
is: File Error; Some digit formats may be lost;
(it direct translation from polish, so it can differ from original)

Please help!
Comment 1 Jason Height 2003-02-03 20:45:02 UTC
You will need to attach your original workbook.xls before we will look into 
this. ie the one you reference at:
 POIFSFileSystem fs      = new POIFSFileSystem(new FileInputStream

Comment 2 Andy Oliver 2003-02-04 02:18:51 UTC
please test this under a recent nightly build.  I believe it is fixed.
Comment 3 Wojtek Konieczka 2003-02-04 12:27:20 UTC
Created attachment 4719 [details]
sheet I used to try the example
Comment 4 Wojtek Konieczka 2003-02-04 12:37:40 UTC
I tried nightly build - jakarta-poi-1.9.0-dev-20030204.jar  and it was still 
the same :(
I created that file with excel 2000. After saving (with poi) excel file was 
Comment 5 Andy Oliver 2003-02-04 13:47:10 UTC
please test with 1.8 or nightly builds.  I think we fixed this already.
Comment 6 Andy Oliver 2003-02-04 13:48:05 UTC
oh sorry missed the later comment.  Please attach the runnable code.
Comment 7 Wojtek Konieczka 2003-02-04 14:02:19 UTC
Created attachment 4721 [details]
zipped servlet's source and the class file
Comment 8 Arne Clau 2003-04-08 21:23:14 UTC
I have got exactly the same problem...... Is there any solution????
Comment 9 lfraile 2003-05-08 14:49:22 UTC
I have the same problem :-(
Comment 10 Pavel Janouskovec 2003-06-19 11:08:54 UTC
I have the same problem. I create new bug with id 20881 
Comment 11 Andy Oliver 2003-07-24 15:35:11 UTC
If its not fixed now, its probably not going to be until 3.0.  We need more i18n
l10n committers.
Comment 12 Avik Sengupta 2003-11-03 17:44:01 UTC
Fixed in 2.0RC1. Checked with Excel 2002, re-written file opens perfectly. 

(BTW, dont use cell.setCellType(HSSFCell.CELL_TYPE_STRING) on a pre-existing
cell.. It'll throw up)
Comment 13 Avik Sengupta 2003-11-03 17:51:38 UTC
Created attachment 8892 [details]
Correctly re-written file