沃梦达 / IT编程 / 服务器 / 正文

导入Excel报错:org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears

Office格式错误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. Y...

Office格式错误

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)

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

本文标题为:导入Excel报错:org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears