poi 解析EXCEL文件时错误

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)



用WPSoffice另存为2003-2007的后缀为.xls的文件。重新读取,正常了。


可这要手工处理一次。无法达到目标。

猜你喜欢

转载自arpenker.iteye.com/blog/2412359