?
Solved

Reading Excel Files in ASP.NET

Posted on 2005-03-24
6
Medium Priority
?
220 Views
Last Modified: 2010-04-16
How can i read through an Excel File and store it in a dataset using c# code?

Thanks
0
Comment
Question by:CDFA_Inc2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

by:rajaloysious
ID: 13624893
You can use Ole Automation objects - Excel Library

Objects like Excel.Application, Excel.Worksheet etc

This also may be of help:
http://www.codeproject.com/csharp/csharp_excel.asp

cheers
0
 
LVL 2

Expert Comment

by:fromeroj
ID: 13630067
you can use System.Data.OleDbClient

so you use the usual ADO.NET with...

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\Book20.xls;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1;"""

so you can query, and get DataSets.....

Regards
0
 
LVL 2

Accepted Solution

by:
fromeroj earned 750 total points
ID: 13630081
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\My Documents\Book20.xls;Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1;\"";
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:fromeroj
ID: 13630103
and a query could be...
Select * FROM ['Sheet 1$']
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13631537
Wow!!!  8 open questions in less than a week.  I can foresee some serious question abandonment out of this one.

Bob
0
 

Author Comment

by:CDFA_Inc2
ID: 13631979
im getting a --- Keyword not supported: 'provider'.---- error

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question