Home > Net >  NPOI2.0 reading EXCEL error Wrong Local header signature: 0 x140403
NPOI2.0 reading EXCEL error Wrong Local header signature: 0 x140403

Time:12-24

XLSX excel file, use the read XSSFWorkbook, new parameter is used when the filestream, error as

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 XLSX
HSSF 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 file

CodePudding user response:

reference 1/f, mouse cried dead cat replies:
XSSF operation is more than Excel2007 version, corresponding to the file suffix is XLSX
HSSF is Excel2003 previous versions of operation, the corresponding file suffix is XLS

This understand, I've met is opened by XSSF. XLSX error, new XSSF, parameters to file streams, directly to the file path can line, the process is a little don't understand
  •  Tags:  
  • C#
  • Related