473,387 Members | 1,678 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,387 software developers and data experts.

Querying Excel File using ADO.NET

Hi all!

I'm trying to create a program that would extract data from an excel
spreadsheet through System.Data.OleDB.

I was wondering...

1. When creating a query from an excel spreadsheet, do I need to put the
exact sheet name?

2. Is there any possible way of dynamically getting the name of the excel
sheet first before querying it?

Thanks a million!

-A
Nov 15 '05 #1
2 4463
Here's a quick article on how to do it
http://www.knowdotnet.com/articles/exceldatasource.html
1) AFAIK you do need the Table name to specify the query..
2) I think the GetOleDbSchemaTable will give you the info
http://www.knowdotnet.com/articles/g...hematable.html
about the Sheet names...

HTH,
Bill
"Ann Marinas" <aC*************@hotmail.com> wrote in message
news:O9**************@TK2MSFTNGP12.phx.gbl...
Hi all!

I'm trying to create a program that would extract data from an excel
spreadsheet through System.Data.OleDB.

I was wondering...

1. When creating a query from an excel spreadsheet, do I need to put the
exact sheet name?

2. Is there any possible way of dynamically getting the name of the excel
sheet first before querying it?

Thanks a million!

-A

Nov 15 '05 #2
Thank you so much! It helped! Really do appreciate it! :)
"William Ryan" <do********@comcast.nospam.net> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...
Here's a quick article on how to do it
http://www.knowdotnet.com/articles/exceldatasource.html
1) AFAIK you do need the Table name to specify the query..
2) I think the GetOleDbSchemaTable will give you the info
http://www.knowdotnet.com/articles/g...hematable.html
about the Sheet names...

HTH,
Bill
"Ann Marinas" <aC*************@hotmail.com> wrote in message
news:O9**************@TK2MSFTNGP12.phx.gbl...
Hi all!

I'm trying to create a program that would extract data from an excel
spreadsheet through System.Data.OleDB.

I was wondering...

1. When creating a query from an excel spreadsheet, do I need to put the
exact sheet name?

2. Is there any possible way of dynamically getting the name of the excel sheet first before querying it?

Thanks a million!

-A


Nov 15 '05 #3

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

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
3
by: Vikram | last post by:
Hi, Given below is my task. An user can open the xls file from my website (loaded on the top frame). After filling the Excel, he can click a send button at the bottom frame. By clicking the...
3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
6
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about...
1
by: Nic | last post by:
Greetings, I'm accessing an Excel spreadsheet directly via OLEDB and displaying the results in a datagrid. I've run into an issue where a column containing lengthy text is being truncated...
1
by: Job Lot | last post by:
i am querying excel file as follows Dim conn As New OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; " & _ "data source='" & "C:\Temp\SSPortfolio.xls" & " '; " & _ "Extended Properties=Excel...
16
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public...
2
by: ge0193387 | last post by:
I have a csv file here that is output from another program. Once this csv has been completed the information needs to be extracted in multiple formats into a formatted excel spreadsheet (sheet a...
1
roswara
by: roswara | last post by:
Dear all, Currently, I am working on a project to make a web-based application using ASP 2.0 and C#. This application will ask user to input for an excel file which has graphs in it. Then the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.