I'am trying to write to an existing XLS file. For the moment i only open existing file then write with POI API. i use this java code: in = new BufferedReader(new FileReader(infileName)); POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream (outfileName)); SSFWorkbook wb = new HSSFWorkbook(fs,false); String finalName = outfileName.substring( 0,outfileName.length()-4) + "_out.xls"; FileOutputStream fileOut = new FileOutputStream(finalName); wb.write(fileOut); fileOut.close(); in.close(); - This code works well on simple xls file ( 1 cell with hello ) but problems appears with my real input xls file. Excell cannot open the output xls file.( Excell 2000/Excell viewer 2003 ) - I use the last release and last dev version. same problem. - while executing, no error, no exception. I dont known how to attach my XLS input file
Created attachment 19169 [details] My input XLS file that occurs problem. i found how to attach :) Problems disappear/appear when suppressing cell M192 but if i let this alone by copying cell M192 on A1, no problem occurs. .....
Could you try with the latest SVN and check if you problem still appears? Thanks
We still have this bug in the latest RC. At least I located the problem. The attached xls contains MulBlankRecords that result in corruption. We have read-only support for this record type. When reading, each MulBlankRecord is converted into a a set of BlankRecord. When writing back out, the BlankRecords are serialized instead of the original MulBlankRecord. This is the issue. Yegor
Retested OK in 3.1-beta1 Bug is reproducible on 2.5.1, but not on 3.0.2. Comment 3 (2007-04-13) was between those two versions.