C#使用NPOI读取Excel报错
C#使用NPOI读取Excel报错:{“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)”}
原因
读取的.xls和.xlsx文件,都是被人手动改了后缀,需要手动把后缀改回来。即:把后缀为.xls的文件后缀改为.xlsx,把后缀为.xlsx的文件后缀改为.xls,改完后再读取就正常了。