Dataset to Cells

Sets the text of a selected cell range in an established Excel session with the values contained in a dataset. Mainly used to enter data onto an Excel document that was previously created or opened using AWE's Create Workbook or Open Workbook actions.

Declaration

<AMEXCELDATASETTOCELLS DATASET="text" CELLREF="text" WORKSHEET="text" />

Example

<AMEXCELOPENWORKBOOK WORKBOOK="c:\excellfile.xls" />

<AMEXCELDATASETTOCELLS DATASET="mydataset" CELLREF="A1" WORKSHEET="Sheet1" />

<AMEXCELCLOSEWORKBOOK />

See Also: Open Workbook, Close Workbook, Add Worksheet, Activate Worksheet, Get Cell, Set Cell, Cells to Dataset, Create Workbook, About Datasets

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="ExcelSess7"

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.

Dataset

Text

Yes

(Empty)

DATASET="mydatasetname"

The name of the dataset holding the data that should be set to the desired cell or range of cells at runtime.

More on datasets

Row

Number

No

1

STARTCELLROW="3"

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

Column

Number

No

1

CELLCOLUMN="2

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

Cell Reference

Text

No

A1

CELLREF="B3"

Specifies the reference of the upper left 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="Sheet1"

If enabled, indicates that the data will be set to a specified worksheet. The worksheet name can be entered in the provided text box. If left blank or omitted, the current active worksheet will be used.

Include Column Names

Yes/No

No

No

INCLUDECOLUMNNAMES="YES"

If enabled, output will include the dataset column names (i.e. the text contained in the column headers) as the first row. The dataset values are then output in subsequent rows. This option is disabled by default.

End Cell Reference

Text

No

C2

ENDCELLREF="E3"

Specifies the end cell reference of the cells where the data should be retrieved. This is an alternate method to specifying the row and column of the desired cell. If specified, the STARTCELLCOLUMN, ENDCELLCOLUMN, STARTCELLROW and ENDCELLROW parameters are ignored. If specified, the STARTCELLREF parameter must also be specified.

Use specific worksheet

Text

No

Sheet1

WORKSHEET="Sheet3"

If enabled, indicates that the data will be retrieved from a specific worksheet instead of the currently active worksheet. Enter the name of the appropriate worksheet in the provided textbox. If left blank or omitted, the current active worksheet will be used.

Description Tab

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Tab

The Error Causes tab properties allow you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More about Error Causes properties

On Error Tab

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

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