Reading an Excel File From C#

后端 未结 5 837
我寻月下人不归
我寻月下人不归 2020-12-09 23:38

I have a connection string to read an excel file from my C# project that looks like this..

String ConnectionString  = \"Provider=Microsoft.ACE.OLEDB.12.0;\"          


        
5条回答
  •  执笔经年
    2020-12-10 00:01

    Other option would be to use a specialized library instead of creating a connection. Take a look on EPPlus, its an open source library to work with excel files in C#. It has worked very good to me.

    http://epplus.codeplex.com/

    And in this link you can see examples on reading excel files with EPPlus:

    http://blog.fryhard.com/archive/2010/10/28/reading-xlsx-files-using-c-and-epplus.aspx

提交回复
热议问题