How to get data from a particular row and a particular column from Data Table in QTP?
Check this Post for Datatable Methods.
QTP Script to get particular cell value from datatable in the specified row.
Below script is for retrieving 2rd row,2rd column cell value from datatable.
In datatable we have values as shown below
A B C
1 QQ xx
2 TT yy
3 PP zz
Script to get value "TT" from datatable is
Method 1
Syntax:Datatable.getsheet("Sheet Name"/Sheet Id).getparameter("Column Name").valuebyrow(Row Number)
msgbox Datatable.getsheet("Global").getparameter("B").valuebyrow(2)
Method 2
Syntax:datatable.SetCurrentRow(rownumber)
Cell Vaue=datatable.Value("ColumnName"/Column Number,"SheetName"/Sheet Id)
datatable.SetCurrentRow(2)
msgbox datatable.Value(2,1)
QTP Script to get RowCount of DataTable for Specific Column
QTP Script to get columncount,rowcount,column names of datatable
Script to Get Cell Value of Particular Row and Column from Data Table in QTP
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment