Loading

excel导入报错:The supplied data appears to be in the Office 2007+ XML.

用以上语句导入excel的时候报错:
信息: Request processing failed; nested exception is org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. POI only supports OLE2 Office documents
 
原因是:
HSSFWorkbook:是操作Excel2003以前(包括2003)的版本,扩展名是.xls
XSSFWorkbook:是操作Excel2007的版本,扩展名是.xlsx
posted @ 2020-06-18 10:08  秋风飒飒吹  阅读(6877)  评论(1编辑  收藏  举报