2

使用 Java POI 生成 excel 表并打开新创建的 Excel 文件后,我收到一个消息框

Excel found unreadable content in "abc.xlxs" .Do you want to recover the contents of this workbook?If you trust the source of this workbook, click 'yes'.

当我点击“是”时,我会收到这样的消息

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

之后,我可以查看工作表中的内容。打开它时如何删除所有这些类型的消息?

4

1 回答 1

0

您应该检查是否使用了正确的 api:

  • 对于 .xls 文件,您必须使用 HSSF。
  • 对于 .xlsx 文件,您必须使用 XSSF 或更高版本的 api。

检查您是否正确编写了excel文件。对于正确的答案,请提供一些代码。

于 2013-01-16T11:53:03.357 回答