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
 
Back
Top