Set Cell

Sets the text of a selected cell in an established Excel session. Used to set or modify the contents of a cell in a Microsoft Excel document that was previously created using the Create Workbook action or opened using the Open Workbook action.

Declaration

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

See Also: Excel Actions Example, Create Workbook, Open Workbook, Close Workbook, Add Worksheet, Activate Worksheet, Get Cell, Cells to Dataset, Dataset to Cells

AWE's Excel actions use Microsoft's Excel automation engine to perform their work. Therefore, Microsoft Excel must be licensed and installed on the system in order for these actions to work. Excel objects run in the context of the user executing them. If EFT is running as a Local System, then the Excel object is executed using the Local System profile. Before using an Excel action in Event Rules, refer to Globalscape Knowledgebase article #11089 for important information.

This action is only useful in conjunction with other Excel actions. It is not possible to use AWE's Excel actions on a spreadsheet that was not opened by the Open Workbook action or created by the Create Workbook action.

General Tab

Property

Type

Required

Default

Markup

Description

Session Name

Text

Yes

ExcelSess1

SESSION="mySession"

The name of the session to associate with this Excel action. Numerous sessions can exist within a single task allowing several spreadsheets to be open simultaneously. If working with only one document, this can remain at the default session name, which is Excelsess1.

New Value

Text

Yes

(Empty)

NEWVALUE="Set text to this value"

The text value to set to the desired cell at runtime.

Row

Number

No

1

CELLROW="3"

The row of the cell where the data should be set. If this parameter is specified, the CELLCOLUMN parameter must also be specified.

Column

Number

No

1

CELLCOLUMN="2

The column of the cell where the data should be set. If this parameter is specified, the CELLROW parameter must also be specified.

Cell Reference

Text

No

A1

CELLREF="B3"

Specifies the reference of the cell (i.e. B3 or C2) where the data should be set. This is an alternate method to specifying the row and column of the desired cell. If this parameter is used, the CELLROW and CELLCOLUMN parameters are ignored.

Use Specific Worksheet

Text

No

3

WORKSHEET="Sheet4"

If enabled, indicates that the data will be set to a specific worksheet. The worksheet name can be entered in the provided text box. If disabled or omitted, the current active worksheet will be used. The default option is set to Use Active Worksheet.