Set Cell Action

Description

Sets the text of a selected cell in an established Excel session (a Microsoft Excel document that was previously created or opened using Automated Workflow's Excel actions).

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

<AMEXCELSETCELL SESSIONNAME="text" NEWVALUE="text" CELLROW="text" CELLREF="text" CELLCOLUMN="text" WORKSHEET="text">

Example

<AMVARIABLE NAME="myvariable"></AMVARIABLE><AMEXCELOPENWORKBOOK WORKBOOK="c:\excellfile.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"

New Value: Specifies text to set to the desired cell at runtime.

Variable, Required
MARKUP: NEWVALUE="Set text to this value"

Cell by position:

Row: Specifies the row of the cell where the data should be set. If specified, CELLCOLUMN must also be specified.

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

Column: Specifies the column of the cell where the data should be set. If specified, CELLROW must also be specified.

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

Cell by reference: Specifies the reference of the cell where the data should be set. This is an alternate method to specifying the row and column of the desired cell.  If specified, CELLROW and CELLCOLUMN are ignored.

Text, Optional Default ""
MARKUP: CELLREF="B3"

Use active worksheet or Use specific worksheet: Specifies to use the active worksheet or the name of the new worksheet that the text will be retrieved from. Use active worksheet is the default.

Text, Optional Default ""
MARKUP: WORKSHEET="My Worksheet Name"

See Also

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