Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

TExcelApplication Server and switching between Excel Worksheets

Posted on 2003-11-12
3
580 Views
Last Modified: 2007-12-19
HELP PLEASE

I require to programmatically switch between two differently named Excel worksheets in the same workbook. The excel file is opened from an already existing template so adding new workbooks is not an option. The template is required due to further analysis required on the output data.

Help please!!!

Malachy Scullion

0
Comment
Question by:malachyscullion
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
GloomyFriar earned 25 total points
ID: 9731429
0
 

Author Comment

by:malachyscullion
ID: 9738517
Thanks for the reply GloomyFriar,

Is there a way of passing the worksheet name as a parameter to a function that changes focus to the selected worksheet?????

ie) excelapplication1.worksheets.select('sample_worksheet_name')
ie) WorkSheet := WorkBk.WorkSheets.Get_Item(1) as _WorkSheet;


most of the solutions i have seen already involve adding your own blank worksheets. this is not valid solution in my case!

thanks

Malachy
0
 

Author Comment

by:malachyscullion
ID: 9738565
Figured out how to do it.......

    WS := ExcelApplication1.Worksheets.Item['sample_worksheet_name'] as _Worksheet;
    WS.Activate(lcidExcel);

Thanks

Malachy
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question