Reputation: 3901
I am generating excel file with dynamic data which having formulas in some cells, When I am opening generated excel file I am getting one popup message from ms excel that:
Excel was able to open the file by repairing or removing the unreadable content.
Removed Records: Shared formula from /xl/worksheets/sheet1.xml part Removed Records: Formula from /xl/calcChain.xml part (Calculation properties)
The log generated by ms excel.
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error120920_01.xml</logFileName>
<summary>Errors were detected in file 'C:\fileName.xlsx'</summary>
-<removedRecords summary="Following is a list of removed records:">
<removedRecord>Removed Records: Shared formula from /xl/worksheets/sheet1.xml part</removedRecord>
<removedRecord>Removed Records: Formula from /xl/calcChain.xml part (Calculation properties)</removedRecord>
</removedRecords>
</recoveryLog>
I am not able find the exact root cause of this problem.I want to find which cell creating this problem.
lib version : apache poi 3.11
Upvotes: 2
Views: 6113
Reputation: 3901
In excel template file, on one cell excel formula was set and I was trying to set XSSFCell.CELL_TYPE_NUMERIC
and assigning numeric value to it using code.
This was causing the problem to open ms excel file.
Upvotes: 4