There are several ways to read and write Excel in C #, specific reference articles:
Http://www.cnblogs.com/huipengkankan/archive/2011/07/28/2120407.html
Yesterday roughly studied, the project uses LIBXL library to read and write, the official website: http://libxl.com/home.html, can support C#\c++\delphi\fortran and so on, the new version can support to Excel2013, It's quite handy to use, but to buy.
Cracked also have, can refer to: http://blog.csdn.net/lbd2008/article/details/8332345
There are not many functions, you can directly refer to the official documents, or look at the Baidu Library
Official Small Example:
class program{static void Main (string [] args) {try {Book book = Span class= "KWRD" >new binbook (); //use Xmlbook () for xlsx Sheet Sheet = Book.addsheet ( "Sheet1" ); SHEET.WRITESTR (2, 1, "Hello, world!" ); Sheet.writenum (3, 1, 1000); Book.save ( "Example.xls" ); } catch (System.Exception e) {Console.WriteLine (e.message); } }}
Excel file read/write