What is the best way/library to read Excel 2003 and 2007 files using C#? I need to do some heavy parsing.
-
1See this question; stackoverflow.com/questions/15828/reading-excel-files-from-cChris McAtackney– Chris McAtackney2010-06-23 15:45:16 +00:00Commented Jun 23, 2010 at 15:45
-
1What do you mean by "heavy parsing"? Can you provide some example?Fredrik Mörk– Fredrik Mörk2010-06-23 15:45:20 +00:00Commented Jun 23, 2010 at 15:45
6 Answers
Do you need to parse the file, or deal with the contents?
For parsing the file, you'd better hope it's in Open Office XML format, because the previous binary version is not documented at all.
If you just need to deal with the contents, use the Office Interop libraries.
Comments
You can try SmartXLS for .Net,it support most features of excel(cell formatting,Charts,formulas,pivot tables etc),and can read/write both the excel97-2003 xls format and the excel2007 openxml format.
Comments
You can use the MS Office interop assemblies (see here) to access Excel files from .NET applications.