poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 59732] File Excel Created From Apache POI Can't Open by Ms Excel (file corrupt)
Date Mon, 20 Jun 2016 07:41:40 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=59732

Javen O'Neal <onealj@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Javen O'Neal <onealj@apache.org> ---
LibreOffice can read
schemi_di_bilancio_armonizzato_2015_ens_art_1_delibera_12_2016_sezaut_inpr.xls
and doesn't report any errors.

Does Excel give you any meaningful errors?

Also, could you try the following:

1. Without modifying the cells
> String nomeFileArt1 = "in.xls";
> NPOIFSFileSystem fs = new NPOIFSFileSystem(new File(System.getProperty("java.io.tmpdir")
+ nomeFileArt1));
> HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);
> FileOutputStream stream = new FileOutputStream(System.getProperty("java.io.tmpdir") +
"out.xls");
> wb.write(stream);
> stream.close();

2. Opening the workbook with preserveNodes=false (both with and without
modifying the file)
> ...
> HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);
> ...

3. Opening the workbook through more common methods
> WorkbookFactory.create(new File("in.xls"));
or
> WorkbookFactory.create(new FileInputStream("in.xls"));

-- 
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