导入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. 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

上一篇:广州市POI数据


下一篇:Java使用POI实现导出Word文档