Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default getting the sheet names present in a work book????

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default getting the sheet names present in a work book????

This is VBA, so you will need to translate to .NET

Sheet names

For Each sh In Activeworkbook
Debug,.Print sh.Name
Next sh

Column names. You mean thge value in Row 1?

Cells(1,"A").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)


"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




  #3   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Work sheets tab names only replace part ot the present name John Augustein Excel Worksheet Functions 2 October 4th 09 06:09 PM
Moving a sheet from one work book to another? WTG Excel Worksheet Functions 1 November 3rd 05 07:12 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
Change Path names in copied work book jheaney Excel Worksheet Functions 2 November 18th 04 07:29 PM
Moving a row to new work sheet/book if order=yes eddy f Excel Programming 2 February 22nd 04 04:15 PM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"