tags:

views:

588

answers:

4

Do you know any free C# library for Excel/CSV import/export operations?

Which should work without having Excel installed on machine and works with 2003/2007 formats.

+1  A: 

According to this specification: OLE-DB and this example. You can connect to an XLS file, run quiries form it and recieve the data. With the data you would be able to format the data how you would like. [in CSV or TSV etc]. Additionally using insert and modification queries you can add data to an XLS file.

monksy
+3  A: 

Hai Kurnal,
have a look at this http://stackoverflow.com/questions/444522/c-asp-net-import-and-export-excel-what-is-the-best-library

Pandiya Chendur
I also suggest "Open XML SDK" in that article.
afsharm
@afsharm Open XML SDK is only for 3.5 or above is it true?
Pandiya Chendur
+1  A: 

From Reading Excel files from C#

You can look at

astander
Just watch out for some weird bugs in the excel odbc driver. The type of each column is determined from the majority in the first 8 rows with default "Text". Cells not matching the type becomes null. e.g. If the first 8 rows in one column are empty, the column will be classified as text and you will no be able to read any numbers from that column.
adrianm
+1  A: 

I found this one... it is helpful

Codeplex exceldatareader

Krunal