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

Why is the use of exit do or exit for statements within loops discouraged?

570


what is the difference between modular and data and keyword driven framework

1745


Which loop is used in case of arrays in the vbscript language?

524


Explain the scope of the variables using dim, public, and private keywords respectively.

724


How can you create an object in vbscript?

616






what is resorceallocation

1776


Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1444


Explain the string concatenation function in vbscript?

544


How will you get the exponent of the given number in vbscript?

565


What is the difference between a dictionary and an array?

583


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

12904


Illustrate briefly about the different types of statement

2027


why variable name should not exceed 255 characters?

1822


Explain the support of asp for vb script functionality?

637


I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.

1796