DTSheet Object

Description

A sheet in the run-time data table. This object is not a built-in utility object, but can be accessed using one of the following methods or properties:

Note: All methods performed on this object apply to the run-time DataTable object only. Changes to the run-time DataTable object are reflected in the run results, but the design time data table is not affected.

When working with scripted components, the name of the (single) Data Sheet is identical to the name of scripted component. If you save the scripted component with a new name, the name of the data sheet changes accordingly.

Methods and Properties

Method AddParameterAdds the specified parameter (column) to the sheet in the run-time data table, sets the value of the first row to the specified value, and returns the parameter so that you can directly set or retrieve properties of the new parameter in the same statement.
Method DeleteParameterDeletes the specified parameter from the sheet in the run-time data table.
GetCurrentRowReturns the row number of the current (active) row in the run-time Data pane sheet.
GetParameterRetrieves the specified parameter from the run-time Data pane sheet.
GetRowCountReturns the total number of rows in the longest column in the run-time Data pane sheet.
NameReturns the name of the run-time data sheet.
SetCurrentRowSets the specified row as the current (active) row in the run-time data table.
SetNextRowSets the row after the current (active) row as the new current row in the run-time Data pane sheet.
SetPrevRowSets the row above the current (active) row as the new current (active) row in the run-time Data pane sheet.

Back to top

AddParameter Method

Description

Adds the specified parameter (column) to the sheet in the run-time data table, sets the value of the first row to the specified value, and returns the parameter so that you can directly set or retrieve properties of the new parameter in the same statement.

Syntax

DTSheet.AddParameter(ParameterName, Value)

Argument

Type

Description

ParamterName

String

Assigns a name to the new parameter. If another parameter in the sheet has the same name, a number (i.e. '1') will be appended to the assigned ParameterName. If the ParameterName contains illegal characters, the illegal characters will be replaced with '_' characters.

Value

String

Assigns a value to the first row of the parameter.

Return Value

DTParameter Object

Back to top

DeleteParameter Method

Description

Deletes the specified parameter from the sheet in the run-time data table.

Syntax

DTSheet.DeleteParameter(ParameterID)

Argument

Type

Description

ParameterID

Variant

Identifies the parameter (column) to be deleted by name or index.

(Index values begin with 1.)

Back to top

GetCurrentRow Method

Description

Returns the row number of the current (active) row in the run-time Data pane sheet.

Syntax

DTSheet.GetCurrentRow

Return Value

Number

Back to top

GetParameter Method

Description

Retrieves the specified parameter from the run-time Data pane sheet.

Syntax

DTSheet.GetParameter(ParameterID)

Argument

Type

Description

ParameterID

String/Index

Identifies the parameter (column) to be returned by name or index.

(Index values begin with 1.)

IMPORTANT

In GUI tests, function libraries, and Scripted GUI components, you can automatically create a GetParameter step in your test by dragging from the data table.

Select the column you want to use, press Alt, and drag the selected column header into your test. The generated step refers to the GlobalSheet or LocalSheet, depending on the sheet you used:

DataTable.GlobalSheet.GetParameter("ParameterName") or DataTable.LocalSheet.GetParameter("ParameterName")

Return Value

DTParameter Object.

Back to top

GetParameterCount Method

Description

Returns the total number of parameters (columns) in the run-time Data pane sheet.

Syntax

DTSheet.GetParameterCount

Return Value

Number

Back to top

GetRowCount Method

Description

Returns the total number of rows in the longest column in the run-time Data pane sheet.

Syntax

DTSheet.GetRowCount

Return Value

Number

Back to top

Name Property

Description

Returns the name of the run-time data sheet.

Syntax

DTSheet.Name

Back to top

SetCurrentRow Method

Description

Sets the specified row as the current (active) row in the run-time data table.

Syntax

DTSheet.SetCurrentRow(RowNumber)

Argument

Type

Description

RowNumber

Number

Indicates the number of the row to set as the active row.

Back to top

SetNextRow Method

Description

Sets the row after the current (active) row as the new current row in the run-time Data pane sheet.

Note: You can only set a row that contains at least one value. If the current row is the last row in the data table, applying this method sets the first row in the data table as the new current row.

Syntax

DTSheet.SetNextRow

Back to top

SetPrevRow Method

Description

Sets the row above the current (active) row as the new current (active) row in the run-time Data pane sheet.

Syntax

DTSheet.SetPrevRow

Back to top

See also: