1. Try to use HSSFWorkbook read, an error is as follows:
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 company's or POI to process this data (eg home XSSF HSSF),
This is obviously not, just give it a try myself
2. The file isn't other types of change the suffix, try holding the attitude, open the file save as. XLSX, problems still
3. XSSFWorkbook filepath can also as when new parameters, try this method, problem solving, (here will prompt method have been out of date)
After trying, the problem can be solved, but the principle is what, no clue, retrieval and retrieval useful information, which the great spirit passing,
please grant instruction!
CodePudding user response:
XSSF operation is more than Excel2007 version, corresponding to the file suffix is XLSXHSSF is Excel2003 previous versions of operation, the corresponding file suffix is XLS
CodePudding user response:
Actually later excel file is a compressed package, you can directly solve reads the XML fileCodePudding user response: