I know of some open source libraries for handling with Excel files but these are for only *.xls or *.xlsx, for example NPOI is for *.xls, EPPlus and ClosedXML are for *.xlsx. I don't want to use Microsoft Excel Automation because of the performance matter. Could you please suggest me with some open source or free library meeting this purpose (handle with both *.xls and *.xlsx).
Asked
Active
Viewed 5.8k times
18
-
This is discussed in detail here http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp – Mudassir Hasan Apr 13 '13 at 17:59
-
1For read or for write? – Joel Peltonen Apr 13 '13 at 18:16
-
Google "Free Opensource C# excel library" – Toby Allen Apr 13 '13 at 18:53
-
@Toby Allen, I don't think it's easy to Google for that, many open source libraries support only *.xls or only *.xlsx, so asking this question is not lazy for Google, also is not duplicated as some ones marked it. Even the link mhasan posted can't help to find a library supporting both xls and xlsx. If you think it's easy, please try and feel yourself. – King King Apr 14 '13 at 11:13
-
The most voted answer in the old question suggesting NPOI and EPPlus which don't satisfy my need. Why do you think this is a duplicate of that question? Looking at the question title, it seems to be a duplicate but the answers to the old question didn't care if those libraries can support both *.xls and *.xlsx. – King King Apr 14 '13 at 11:20
-
xls and xlsx are very very different internal structure, one is binary one is XML, its unlikely you will get one library to do both. Is it not possible for you to link to two libraries for what you want? – Toby Allen Apr 14 '13 at 13:28
-
No, linking two binaries is not easy, I may create 2 versions of methods for every task, for example, creating, editing, ... because two libraries have different methods. However to use both, I should create myself some kind of interface or wrapper class. It's a reason I don't want to use 2 in my project. Another reason is the files size. Of course, if there is no all-purpose library, I have to go that way. Thanks. – King King Apr 14 '13 at 13:52
-
[Essential XlsIO](http://www.syncfusion.com/products/file-formats/xlsio) supports xls and xlsx - Free community license available. – Davis Jebaraj Oct 10 '16 at 19:49
1 Answers
13
How about spreadsheetlight? Is open-source, with an MIT license.

WolfOdrade
- 350
- 2
- 11
-
1Microsoft release a compatibility pack for the older versions of excel to use the newer format. But if you need to support office 97 you would still need xls support. – Dreamwalker Oct 31 '14 at 16:48
-
You should add this answer to http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp since this question is closed as a dupe and it looks like the best solution. – Chris Marisic Aug 11 '15 at 21:30
-
1
-
@WolfOdrade `spreadsheetlight` is the library which in turn uses `Documentformat.OpenXML`. – Kunal Kakkad Dec 28 '15 at 08:08