QTP Script to get datatable column count
Syntax:-DataTable.GetSheet("sheet name"/sheetid).getparametercount
Example:-DataTable.GetSheet(1).getparametercount
Script to add new parameter(column)to datatable
Syntax:-DataTable.GetSheet("sheet name"/sheetid).AddParameter "columnname","value"
Example:-DataTable.GetSheet(1).AddParameter "AAA","4"
QTP Script to get all parameter(column)names
For i=1 to a
b=DataTable.GetSheet(1).GetParameter(i).Name
msgbox (b)
Next
where a=parametercount(columncount)
To get rowcount of datatable
DataTable.GetRowCount
Datatable Methods
QTP Script to get DataTable ColumnCount,Adding new Column to Datatable,Getting Datatable Column Names
Subscribe to:
Post Comments (Atom)
3 comments:
How do you get a row count for a specific column?
Steve
Steve check this link
http://funandknowledge.blogspot.com/2008/05/sc.html
Hi, do you know if it is possible to change the name of a parameter (column) of the run-time data table loaded by qtp ?
Post a Comment