Excel 能够通过修复或删除不可读的内容来打开文件

Excel was able to open the file by repairing or removing the unreadable content

我正在生成 excel 文件,其中包含在某些单元格中具有公式的动态数据,当我打开生成的 excel 文件时,我从 ms excel 收到一条弹出消息:

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)

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>

我无法找到此问题的确切根本原因 problem.I 想找出造成此问题的单元格。 库版本:apache poi 3.11

在 excel 模板文件中,在一个单元格上设置了 excel 公式,我试图设置 XSSFCell.CELL_TYPE_NUMERIC 并使用代码为其分配数值。 这导致了打开 ms excel 文件的问题。