paulyoder / LinqToExcel

Use LINQ to retrieve data from spreadsheets and csv files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I read Excel with mime-type: "application/vnd.ms-excel"

anhhtz opened this issue · comments

Hello,

My Excel file is exported from private application. I can't read it using LinqToExcel because the mime-type is application/vnd.ms-excel.

Error:

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll

Additional information: External table is not in the expected format.

Hope someone help me resolve it.

Thanks!

LinqToExcel / ACE decide how to open the file based on its extension. application/vnd.ms-excel seems to be associated with the older .xls file format. Without seeing your file/code, I can't tell which extension you're using.

An option might be to open it in excel, and re-save it as a new file.

It’s done. I convert the file to xlsx. Works perfect 🙂