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

Explain about .wsf files?

711


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

1893


How to open a file. What is the perpose of true and false mode there?

704


Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?

635


How to create a function in vbscript?

665






Mention what are the rules to name variable in vbscript?

627


Explain few date functions in vbscript?

698


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

1966


Which operator can be used to check if two numbers are equal or not in vbscript?

760


How can you create an object in vbscript?

704


What are the naming conventions while declaring a variable in the vbscript language?

702


How can you create a file object to work with the files in the vbscript language?

593


Difference between dim,public and private variables in vb script?

613


how to increase the values in text box in a given text box increament by two values by clicking on button

1740


How to add actions in driver script to run those actions in QTP?

1608