What is a good way to read Excel files in C#? Point is having web page from which user can upload an Excel file, which will then be read and sent to database table.
OleDB way is useless here, as as far as I know, it can read use one file, and here would be many.
Best way I found so far is this one:
http://www.codeproject.com/KB/office/csharp_excel.aspx
Any other better/newer methods?
Thanks.
Using OLEDB you can access multiple files by building your connection string based on the name of the file you want to open. Something like the following should work:
For XLSX:
For XLS:
Where
fileNameidentifies the file you want to open.