apache poi upgrade from 2.5 to 3.8 gives Excel err

2019-08-02 13:25发布

We need to provide support for Excel 2010 so have upgraded to Apache poi 3.8. But while downloading the excel it takes so much time for opening and also provides error message as "EXCEL found unreadable content. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click yes"

And after clicking "yes", it gives me one more pop up which says,

Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded. Removed Records: Merge cells from /xl/worksheets/sheet1.xml part

Kindly help me resolving this issue.

Thank-you

2条回答
在下西门庆
2楼-- · 2019-08-02 13:46

I had a exact problem using POI 4.0.0

The issue is with POI version. I downgrade the version from 4.0.0 to 3.17 and the problem resolved.

查看更多
forever°为你锁心
3楼-- · 2019-08-02 13:53

I had a similar problem using POI 3.9

It was the following

  1. I created the XLSX spreadsheet in LibreOffice 4.0.2.2
  2. I could open this LibreOffice generated XLSX in Office 2010 with no problems
  3. With POI I opened this workbook and wrote to it. Very simple stuff, Strings only
  4. Office 2010 then reports that my XLSX is corrupt and 'fixes' it

I created a new XLSX in Word 2010 and modified it with POI 3.9 and the problem went away

查看更多
登录 后发表回答