Activate Cell Action

Declaration

<AMEXCELACTIVATECELL SESSION="Text" ACTION="Text [option]" CELLREF="Text" CELLROW="Text" CELLCOLUMN="Text" UPPERLEFTREF="Text" LOWERRIGHTREF="Text" UPPERLEFTROW="Text" UPPERLEFTCOLUMN="Text" LOWERRIGHTROW="Text" LOWERRIGHTCOLUMN="Text" />

See Also

Activate Cell Action-Setting Properties Create Workbook, Open Workbook, Close Workbook, Add Worksheet, Activate Worksheet,  Set Cell, Cells to Dataset, Dataset to Cells

Description

Activates a cell in an established Excel session.

Practical Usage

To activate a cell in a Microsoft Excel document that was previously created or opened using one of AutoMate's Excel actions. This action is only useful in conjunction with other Excel actions found in AutoMate.

IMPORTANT: The Excel actions in AutoMate 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.

Parameters

General Tab

Session Name

Text, Optional - Default "ExcelSess1"
MARKUP: SESSION="ExcelSess2"

Specifies the session name to identify which document should be acted on. 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.

Activate

Text [options], Optional - default "cell by reference"
MARKUP: ACTION="rangebyposition"

Specifies the cell selection method.

Options are:
 

Cell reference

Text, Required if active
MARKUP: CELLREF="B3"

Specifies the reference of the cell to activate. Active only if Cell by reference is the selected Activate parameter.

Row

Text, Optional - Default "1"
MARKUP: CELLROW="3"

Specifies the row of the cell to activate. Active only if Cell by position is the selected Activate parameter.  

Column

Text, Optional - Default "1"
MARKUP: CELLCOLUMN="2"

Specifies the column of the cell to activate. Active only if Cell by position is the selected Activate parameter.   

Upper Left Cell

Text, Required if active
MARKUP: UPPERLEFTREF="A1"

Specifies the reference of the upper left cell in the range of cells to activate. Active only if Range of cells by reference is the selected Activate parameter.  

Lower Right Cell

Text, Required if active
MARKUP: LOWERRIGHTREF="C5"

Specifies the reference of the lower right cell in the range of cells to activate. Active only if Range of cells by reference is the selected Activate parameter.

Upper Left Cell Row

Text, Required if active
MARKUP: UPPERLEFTROW="1"

Specifies the row of the upper left cell in the range of cells to activate. Active only if Range of cells by position is the selected Activate parameter.

Upper Left Cell Column

Text, Required if active
MARKUP: UPPERLEFTCOLUMN="1"

Specifies the column of the upper left cell in the range of cells to activate. Active only if Range of cells by position is the selected Activate parameter.

Lower Right Cell Row

Text, Required if active
MARKUP: LOWERRIGHTROW="14"

Specifies the row of the lower right cell in the range of cells to activate. Active only if Range of cells by position is the selected Activate parameter.

Lower Right Cell Column

Text, Required if active
MARKUP: LOWERRIGHTCOLUMN="3"

Specifies the column of the lower right cell in the range of cells to activate. Active only if Range of cells by position is the selected Activate parameter.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMEXCELACTIVATECELL SESSION="ExcelSess1" ACTION="rangebyposition" UPPERLEFTROW="1" UPPERLEFTCOLUMN="1" LOWERRIGHTROW="12" LOWERRIGHTCOLUMN="3" />