Xlsx file content is corrupted after upgrading apache poi from 3.17 to 4.1.2/5.0.0 till 5.2.3 version

94 Views Asked by At

I am facing same issue as mentioned in xlsx file content is corrupted after upgrading apache poi from 3.17 to 5.0.0 version.

I could open the Excel file generated successfully,but when it is transferred to a third party like exchange server or Power BI,it is throwing error saying the excel is corrupted.Please note I am using the following code

workbook.write(outputStream); 
workbook.dispose(); 
outputStream.close(); 

But this is not resolving my issue.

Another difference I observed is some of the xml files have "standalone=no" when extracting it to xml.This is tracked under https://bz.apache.org/bugzilla/show_bug.cgi?id=67396

I am not sure if "standalone=no" is the reason for corruption.

Any input will be helpful.

0

There are 0 best solutions below