View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Reny J Joseph Thuthikattu Reny J Joseph Thuthikattu is offline
external usenet poster
 
Posts: 2
Default getting the sheet names present in a work book????

Thanx .I am able to figure it out

Dim xlApp As Excel.Application

Dim xlWB1 As Excel.Workbook

Dim x1WS1 As Excel.Worksheet

xlApp = New Excel.Application()

xlApp.Visible = True

xlWB1 = xlApp.Workbooks.Open("C:\2004.xls")

For Each x1WS1 In xlWB1.Worksheets

MsgBox(x1WS1.Name())

Next

xlWB1.Close()

xlApp = Nothing



Reagdrs



Reny
"Reny J Joseph Thuthikattu" <renyatbxtechdotcom wrote in message
.. .
Hi,
I want to dump some date from a excel file to a database.So i am using
VB.NET , Excel 2003 to do so.I want to know how do i get the names of the
sheets present in a workbook and would like to know is there is any way to
identify the column names in a worksheet??????

Regards

Reny


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/04




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.809 / Virus Database: 551 - Release Date: 09/12/04