473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Accessing excel files from C#

Does anyone know how to read an Excel file using C# and treat the resluts as
RecordSets?

Thanks

Mike
Nov 16 '05 #1
2 3238
Mike,

Do you mean ADODB recordsets, or a data set? If you mean ADODB
recordsets, then you can use COM interop and use the JET OLE DB Provider to
get a recordset in C#.

If you mean a DataSet, then you will have to use COM automation to
access Excel, and get the information programatically to populate the
DataSet.

The Knowledge base article 316126, titled "HOW TO: Use Visual C# .NET to
Automate a Running Instance of an Office Program" should help, it is located
at (watch for line wrap):

http://support.microsoft.com/default...b;en-us;316126

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mike Grishaber" <mg********@cp.org> wrote in message
news:oP*********************@news20.bellglobal.com ...
Does anyone know how to read an Excel file using C# and treat the resluts
as
RecordSets?

Thanks

Mike

Nov 16 '05 #2
Hi,
If you meant using ADO.NET (no RecordSets), then check this one:
http://support.microsoft.com/kb/306572

For ADO (with RecordSets), see if this helps:
http://support.microsoft.com/kb/306023

"Mike Grishaber" <mg********@cp.org> wrote in message
news:oP*********************@news20.bellglobal.com ...
Does anyone know how to read an Excel file using C# and treat the resluts as
RecordSets?

Thanks

Mike

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kumar | last post by:
Hi Folks, I have a question regarding my windows c# application. This application just reads MS Excel file and puts the data in to sql server database. In that excel file ,it has one named cell...
1
by: Aymer | last post by:
scenario: i have a web form, which users input various information. the web form can be accessed by ie browser inside an intranet. every computer in the network has an excel program. ...
1
by: sk | last post by:
Please forgive me if the same topic is already posted. But i havent found I have got an error while accessing the excel file as below. Can somebody reply if there is a solution Access is denied....
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
1
by: Barbara Alderton | last post by:
I’m relatively new to .NET. I would like to write a VB.NET app (I read that using C# isn't as elegant when dealing with Office products) that reads in Excel files (forms) of both 2000 and 2003...
0
by: jd_12345 | last post by:
Windows XP Pro SP2 Excel 2003 SP2 IBM DB2 Personal Edition accessing a DB2 database on an AIX server via the DB2 ODBC driver I am accessing an external DB via MS Excel using Data-->Import...
18
by: gonzlobo | last post by:
No, I don't want to destroy them (funny how the word 'decimate' has changed definition over the years) :). We have a data acquisition program that saves its output to Excel's ..xls format....
1
by: chetuashish | last post by:
I am importing a excel sheet data into a data set using C#.net in a web application i m using following connection string "DSN=Excel Files;DBQ=C:\\Inetpub\\wwwroot\\uninumberusa\\CDR\\Intellicenter...
16
emibt08
by: emibt08 | last post by:
Hello fellow programmers. I am working on a project that is a windows service. It should open an excel file and read it and it worked good on WinXP SP2 w/ Office 2003. Now the customer upgraded to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.