Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why close xml does not support .xls formated excel file?

Tags:

c#

closedxml

During accessing ".xls" formated excel file using "closed xml" dll following exception is occurred

Exception : Excel may contain corrupted data...

like image 582
Shriram Sapate Avatar asked Sep 02 '25 13:09

Shriram Sapate


2 Answers

As stated by others, ClosedXML only works with the newer format.

NPOI works with older versions as well. If you use NPOI, make sure that you download the beta from their site. As of Dec 18, 2013 the NuGet download ONLY supports XLS. The beta supports XLS and XLSX

like image 75
Brad Bruce Avatar answered Sep 05 '25 17:09

Brad Bruce


ClosedXML uses the Open XML SDK under the hood which in turn only works with the newer Open XML file format (beginning with Excel 2007).

Therefor ClosedXML doesn't support the older format.

like image 26
Andreas Adler Avatar answered Sep 05 '25 16:09

Andreas Adler