CDFA_Inc2
asked on
Reading Excel Files in ASP.NET
How can i read through an Excel File and store it in a dataset using c# code?
Thanks
Thanks
you can use System.Data.OleDbClient
so you use the usual ADO.NET with...
ConnectionString = "Provider=Microsoft.Jet.OL EDB.4.0;" & _
"Data Source=e:\My Documents\Book20.xls;Exten ded Properties=""Excel 8.0;HDR=NO;IMEX=1;"""
so you can query, and get DataSets.....
Regards
so you use the usual ADO.NET with...
ConnectionString = "Provider=Microsoft.Jet.OL
"Data Source=e:\My Documents\Book20.xls;Exten
so you can query, and get DataSets.....
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and a query could be...
Select * FROM ['Sheet 1$']
Select * FROM ['Sheet 1$']
Wow!!! 8 open questions in less than a week. I can foresee some serious question abandonment out of this one.
Bob
Bob
ASKER
im getting a --- Keyword not supported: 'provider'.---- error
Thanks
Thanks
Objects like Excel.Application, Excel.Worksheet etc
This also may be of help:
http://www.codeproject.com/csharp/csharp_excel.asp
cheers