poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46419] New: XSSFWorkbook.wirte() file format error
Date Fri, 19 Dec 2008 12:45:20 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46419

           Summary: XSSFWorkbook.wirte() file format error
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: jmvazquez@lomg.net


Created an attachment (id=23038)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23038)
Saved xlsx file using the specified code. Very simple xlsx file. Open Office
3.0 don't recognize it

Using this code to load an xlsx file and save it in another path with o without
changes.

Workbook xlsDocument=null;
try {
   xlsDocument = WorkbookFactory.create(new FileInputStream(pathOriginal));
} catch (FileNotFoundException ex) {
   ex.printStackTrace();
} catch (Exception ex) {
   ex.printStackTrace();
}
FileOutputStream fos = new FileOutputStream(pathTemp);
xlsDocument.write(fos);
fos.flush();
fos.close(); 

The saved file contains file format errors.

If the saved file is a complex file,
when you try to open it with excel, it says that the file is damaged but
sometimes can repair it. With simples files (including the most simple file,
only one cell with a simple text content) excel can open the file without
errors. But if you try to open the saved file using OpenOffice
3.0 which supports xlsx file format. OpenOffice 3.0 can open the original
xlsx file without problems, but the saved file isn't recognized by
OpenOffcie 3.0.

If you open the saved file with excel and save it again (usign save option
from excel), now OpenOffice can open it without problems, so I supose that
exists a save bug that causes a format problem that usually can be repaired
by excel, but never can be repaired by OpenOffice.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message