问题
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
回答1:
I had a similar problem using POI 3.9
It was the following
- I created the XLSX spreadsheet in LibreOffice 4.0.2.2
- I could open this LibreOffice generated XLSX in Office 2010 with no problems
- With POI I opened this workbook and wrote to it. Very simple stuff, Strings only
- 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
回答2:
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.
来源:https://stackoverflow.com/questions/16292939/apache-poi-upgrade-from-2-5-to-3-8-gives-excel-error