Error when trying to read an .xls file using EPPlus

后端 未结 2 1182
广开言路
广开言路 2021-01-17 11:53

The following code is working fine for .xlsx, but it\'s not working for .xls. I got this error message

Can not open the package. Package is an OLE com

相关标签:
2条回答
  • 2021-01-17 12:33

    EPPlus does not work with the XLS format. Only XLSX. You'll need to find a new library.

    0 讨论(0)
  • 2021-01-17 12:37

    I succesfully used Tony's answer https://stackoverflow.com/a/18904633/306515 and simply convert it using Microsoft.Office.Interop.Excel and can still then use epplus

    0 讨论(0)
提交回复
热议问题