Convert Excel Range to ADO.NET DataSet or DataTable, etc

后端 未结 5 1500
深忆病人
深忆病人 2020-12-19 11:39

I have an Excel spreadsheet that will sit out on a network share drive. It needs to be accessed by my Winforms C# 3.0 application (many users could be using the app and hit

5条回答
  •  生来不讨喜
    2020-12-19 12:33

    It's worth to take a look at NPOI when it comes to read/write Excel 2003 XLS files. NPOI is a life saver.

    I think you'll have to iterate your range and create DataRows to put in your DataTable.

    This question on StackOverflow provides more resources:

    Create Excel (.XLS and .XLSX) file from C#

提交回复
热议问题