Solved

TExcelApplication Server and switching between Excel Worksheets

Posted on 2003-11-12
3
571 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
A short article about a problem I had getting the GPS LocationListener working.
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…
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now