QTP Script to get RowCount of DataTable for Specific Column

QTP Script to get rowcount of datatable for specific column.

count1=0
For i=0 to datatable.GetRowCount-1
a= datatable.Value("A")
datatable.SetNextRow
If a<>vbNullstring Then
count1=count1+1
End If
Next
msgbox count1

where A is column name(in datatable).

QTP Script to get DataTable ColumnCount,Adding new Column to Datatable,Getting Datatable Column Names

3 comments:

Anonymous said...

Hello,
This piece of code has been so helpul and useful for me. Thanks for all your efforts. When I searched in google, there were couple of other matches, but they were all so lengthy and complicated for the same output. I 've to mention I was pretty impressed. It is so easy to follow. Keep up the good work :)

Anonymous said...

This code was very useful to me in a critical situation.
To whomsoever it is "Keep up the good work"

Anonymous said...

Very helpful code.

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge