当前位置: 代码迷 >> 综合 >> org.apache.poi.poifs.filesystem.OfficeXmlFileException异常
  详细解决方案

org.apache.poi.poifs.filesystem.OfficeXmlFileException异常

热度:78   发布时间:2023-11-18 02:41:31.0

场景:解析excel的时候出现

完整bug名称:org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)

字面的意思是文件中的数据是用Office2007+XML保存的,而现在却调用OLE2 Office文档处理,应该使用POI不同的部分来处理这些数据,比如使用XSSF来代替HSSF

参考文章: 
https://blog.csdn.net/guo147369/article/details/78364543

  相关解决方案