今天在做项目的过程中,需要读取excel文件,但是读取过程中一直报这样一个错误:

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 versions 97/2000/XP/2003)

是因为excel文件比较旧

解决方法一:

将源文件打开,另存为,如下图所示:

org.apache.poi.hssf.OldExcelFormatException: The supplied spreadsheet seems to be Excel 5.0/7.0

解决方法二:

使用OldExcelExtractor(译:老的excel提取器)这个类来进行解析

org.apache.poi.hssf.OldExcelFormatException: The supplied spreadsheet seems to be Excel 5.0/7.0

 

相关文章:

  • 2022-02-26
  • 2021-12-24
  • 2022-02-08
  • 2021-05-21
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-21
  • 2021-10-13
  • 2021-11-12
  • 2022-02-11
  • 2021-12-13
  • 2022-12-23
  • 2021-10-23
相关资源
相似解决方案