Home > Net >  To ask questions about the read of excel.
To ask questions about the read of excel.

Time:12-01

Yesterday at the time of developing reading excel met a problem, is at the time of reading excel complains, has said format errors, I used the HSSFWorkbook XSSFWorkbook and Aspose Workbook to read will appear this problem, finally found a problem is, indeed, read excel, like TXT text directly modify suffix XLS instead, but this is excel export machine so can't change, want to ask next everybody what to do with this situation, how to convert the excel read and datatable

CodePudding user response:

"As TXT text directly modify suffix to XLS"???????

Then change the XLS TXT back, if open text can identify, went to TXT read to go,

CodePudding user response:

What machine export cannot be modified

CodePudding user response:

Is the client machine export excel, they mean to import directly, save as XLS format also can import but actually they don't want to, so want to code change

CodePudding user response:

Seems to be exported as TXT, just change the suffix to XLS, right, of course, should use the TXT to parse, cannot directly in the XLS way directly to the load

CodePudding user response:

Open the file with notepad look at content, if you think of that "like", can directly use the way to read text parsing the file to read the content

CodePudding user response:

Since be TXT then modify the suffix read directly into plain text, should also have a placeholder in TXT whitespace and line breaks, you can need according to split the string out ~ or if you can paste the contents of part for your reference, we can help you to solve and analyze in detail, the last question is whether you this is modified suffix file can directly use excel to open? After opening the content can display properly?
  •  Tags:  
  • C#
  • Related