poi Error parsing EXCEL file

java.io.IOException: Invalid header signature; read 0x505954434F44213C, expected 0xE11AB1A1E011CFD0
at org.apache.poi.poifs.storage.HeaderBlock.<init>(HeaderBlock.java:140)
at org.apache.poi.poifs.storage.HeaderBlock .<init>(HeaderBlock.java:104)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:138)
at com.suning.utils.excel.POIReadExcel.loadXls(POIReadExcel.java :35)
at com.suning.utils.excel.POIReadExcel.main(POIReadExcel.java:131)



use WPSoffice to save as a 2003-2007 file with a suffix of .xls. Read it again, it's normal.


But this has to be done manually once. Unable to reach the goal.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326070556&siteId=291194637