When importing an excel file that has several columns each
with different number of rows into QTP's Global datatable,
how can you count the number of rows in a particular column?

Answer Posted / pushkar1206

datatable.ImportSheet "C:UserspushkarDesktop123.xls","Sheet1","Action1"
rw=datatable.GetSheet("Action1").GetRowCount
For i=1 to rw
a=datatable.GetSheet("Action1").GetParameter("_11").ValueByRow(i)
c=len(a)
If c>0 Then
b=b+1
End If
Next
msgbox b

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between vb debugger and the script debugger?

593


How do you declare a variable in vbscript?

631


Illustrate briefly about the different types of statement

2025


What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?

581


What are the 2 ways to pass a value to the function?

518






Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository

1794


What are string functions in vbscript?

656


What purpose does ‘on error resume next’ serves?

551


Explain about tristate constants in vbscript?

618


Mention how to create a cookie using vbscript?

532


What is the extension of the vbscript file?

553


What is the difference between a dictionary and an array?

583


What are keywords in the vbscript language?

527


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

1754


How are arrays declared in the vbscript language?

543