Is there a Dot NET (C#) library for MS Excel operations (read/write)? [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this questionI'm coding a library from scratch and was wondering if one already exists.
I need to perform the following operations:
- Read all sheets from all excel files in a specified folder and place them in a data set (each sheet from each file in a different data table. And each excel sheet in a different data set) - A quick efficient way to write one data table to a new excel file in one excel sheet. - Works on xls and xlsx files.A link to an open source library would be really help开发者_StackOverflowful.
It's not open source, but I usually find myself using the Open XML SDK 2.0 from Microsoft to perform this type of work.
as an alternative to the component you can query a spreadsheet as a "classic" datasource like Sql Server. Create a connection string pointing to the path of your file and use the Microsoft.jet.oledb.4.0 provider (it is not available on x64 os, in that case you will have to use third party component to establish the connection). Once this is done you can run sql statements over your .xls .
Here you can find some useful infos : hhttp://www.davidhayden.com/blog/dave/archive/2006/05/26/2973.aspx
Aspose.Cells is a good library for handling Excel files.
However, it is not open source.
I have yet to find a good library that is open source for this.
Take a look at EPPlus: Codeplex. Note that it only works with .xlsx, is that a problem, or could it work?
I am using this code for reading excel file(.xls binary) http://www.codeproject.com/KB/office/Excel_DataReader.aspx
精彩评论