Select Data in Worksheet 1

  • Thread starter Thread starter Jim M
  • Start date Start date
J

Jim M

I am able to select data from worksheet 1 if I know the sheet name...

OleDbCommand objCmdSelect =new OleDbCommand("SELECT * FROM [Sheet1$]",
objConn);

How would I just get the data from the first (primary sheet) if I do not
know the name of Sheet1$ ?

Thanks in advance!
 
Jim,

This self-same question was asked back in April. Here is my suggested
solution using ADOX to get that first sheet name
http://tinyurl.com/yw6dp

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top