What's the best tool to import an excel spreadsheet in C# these days? I'm currently using Interop.Excel.dll.
From stackoverflow
-
You can use the Jet OLEDB Provider:
connection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\somepath\mySpreadsheet.xls;" & _ "Extended Properties=""Excel 8.0;HDR=Yes"""Where
"HDR=Yes"means that there is a header row in the cell range (or named range), so the provider will not include the first row of the selection into the recordset.Ref: how to use ADO to read and write data in Excel workbooks
See also:
ProfK : I have just found a funny using Jet: My column headings are dates, and these get transformed into arbitrary column names like 'F1', 'F2', etc. I'll comment again if I find a solution.
0 comments:
Post a Comment