Title: how to retrieve a list of sheet from excel with odbc in c#?

  • Thread starter Thread starter Laurent Liegeois
  • Start date Start date
L

Laurent Liegeois

I have a document in excel with several sheets, But I would like to
build a listbox with the lis
-=zoltux=-
 
You can enumerate the Worksheets collection grabbing the
name of each sheet....

for each worksheet in workbook
someList.Items.Add(worksheet.name);//It might be
activesheet,I haven't done it in a while.
next

I don't know how far you have gotten in your code, I'm
assuming you already have the Excel 9.0 reference set and
have created your workbook. If you only need to do this
once to an existing book, just open it and run through the
sheets collection as mentioned above.

let me know if you have any problems.

Bill

W.G. Ryan
 

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