读取旧的Microsoft Office Excel文件类型

时间:2019-06-25 11:20:11

标签: java excel apache-poi

我试图阅读带有Apache Poi库的Microsoft Excel 5.0 / 95工作簿(xls),但出现错误消息。 Apache Poi仅支持BIFF8格式。 有没有办法读取此文件类型? 我试图用HSSFWorkbook类阅读。是否有支持此文件类型的库?

我收到此错误消息:

Exception in thread "main" org.apache.poi.hssf.OldExcelFormatException: The supplied spreadsheet seems to be Excel 5.0/7.0 (BIFF5) format. POI only supports BIFF8 format (from Excel versio
ns 97/2000/XP/2003)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.getWorkbookDirEntryName(HSSFWorkbook.java:292)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:339)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:413)
        at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:394)

0 个答案:

没有答案