TA的每日心情 | 奋斗 2022-7-13 15:22 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
回复 #6 wuzhuayu 的帖子
Description
DataTable default property. Retrieves or sets the value of the cell in the specified parameter and the current row of the run-time Data Table.
Note: This property returns the computed value of the cell. For example, if the cell contains a formula, the method returns True or False.
Syntax
To find the value:
DataTable.Value(ParameterID [, SheetID])
or
DataTable(ParameterID [, SheetID])
To set the value:
DataTable.Value(ParameterID [, SheetID])=NewValue
or
DataTable(ParameterID [, SheetID]) =NewValue
Argument
Type
Description
ParameterID Variant Identifies the parameter (column) of the value to be set/retrieved. Index values begin with 1.
SheetID Variant Optional. Identifies the sheet to be returned. The SheetID can be the sheet name, index or dtLocalSheet, or dtGlobalSheet.
If no Sheet is specified, the first sheet in the run-time Data Table is used (the global sheet for tests, or the component sheet for business components). Index values begin with 1.
NewValue String Sets the value for the specified table cell.
Example
The following example uses the Value property to set the value in the current row of the Destination parameter (column) in the "ActionA" sheet in the run-time Data Table.
DataTable.Value ("Destination", "ActionA")="New York"
The following example uses the Value property to set the value in the current row of the second parameter (column) in the third sheet.
DataTable.Value (2,3)="New York"
Note: You could omit the word Value in the statements above, because Value is the default property for the DataTable object.
The following example uses the default property to set the value in the current row of the Destination parameter (column) in the current (active) local sheet.
DataTable("Destination", dtlocalSheet)="New York" |
|