Solved

TExcelApplication Server and switching between Excel Worksheets

Posted on 2003-11-12
3
586 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
[X]
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
  • 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

In this post we will learn different types of Android Layout and some basics of an Android App.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Six Sigma Control Plans

630 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