You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Thomas Jiang <Th...@geotab.com> on 2010/06/29 16:54:44 UTC

Poi will corrupt xls file when there is a 'Chart sheet' in the Excel file, Excel 2010

If the xls file has a 'Chart sheet', poi method Workbook.write(OutputStream)
will corrupt the file. Excel 2007 and earlier does not show the corruption, but
Excel 2010 will detect the corruption and show it.

What we have done here is straightforward. We use HSSFWork's constructor,
HSSFWorkbook(FileInputStream) to read a xls file with Chart sheet from disk,
and directly write it back using method Workbook.write(OutputStream). The file
is corrupted afterwards.


-Thomas

________________________________

This email is intended only for the person(s) it is addressed to and may have information that is privileged or confidential. Any distribution or disclosure is prohibited. If you have received this in error, please notify the sender immediately and destroy the email. In the interest of the environment, please don't print this email unless you really need to. www.geotab.com