Activate Worksheet Action

Description

Activates a worksheet in a workbook from an established Excel session (inside a Microsoft Excel document that was previously created or opened using Automated Workflow's Excel actions). This action is only useful in conjunction with the other Excel actions found in Automated Workflow.

IMPORTANT: The Excel actions in Automated Workflow use the Microsoft Excel automation engine to perform their work. Because of this, Microsoft Excel must be licensed and installed on the system to use the Excel Actions.

Declaration

<AMEXCELADDWORKSHEET SESSIONNAME="text" WORKSHEETNAME="text" LASTWORKSHEET="yes/no" TEMPLATENAME="text">

Example

<AMEXCELCREATEWORKBOOK WORKBOOK="c:\myexceldocument.xls">

     <AMEXCELADDWORKSHEET WORKSHEETNAME="My New Sheet" LASTWORKSHEET="YES">

     <AMEXCELACTIVATEWORKSHEET WORKSHEET="My New Sheet">

     <AMEXCELSETCELL NEWVALUE="Set this data here" CELLROW="1" CELLCOLUMN="1">

     <AMEXCELSETCELL NEWVALUE="and this here" CELLROW="2" CELLCOLUMN="1">

<AMEXCELCLOSEWORKBOOK>

General Tab Parameters

Session name: Specifies the session name to identify which document should be changed from prior Excel steps. This allows several Excel files to be open simultaneously. If working with only one document, this value should not be changed from its default value.

Text, Optional - Default "Default"
MARKUP: SESSION="YES"

By name: Specifies the name of the worksheet that should be activated. By default this is the text caption on the worksheet, however if BYINDEX=1 is specified then it can be a number (starting at 1).

Text, Required
MARKUP: WORKSHEET="worksheetname"
or WORKSHEET="2" BYINDEX=1

By Index: When enabled, specifies that the WORKSHEET parameter is a number and not a text caption.

Yes/No, Optional - Default NO
MARKUP:
a) BYINDEX="yes"

See Also

Create Workbook, Open Workbook, Close Workbook, Add Worksheet,  Get Cell, Set Cell, Cells to Dataset, Dataset to Cells