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?
Answers were Sorted based on User's Feedback
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 |
Answer / satya
Here is a piece of code where we are importing the exl
sheet DS and getting row count then using them in For Loop.
datatable.AddSheet ("DS")
Datatable.ImportSheet "C:\satya.xls","DS","DS"
RowCount = Datatable.GetSheet("DS").GetRowCount
For RowCount = 0 to RowCount -1
Datatable.GetSheet("DS").SetCurrentrow(RowCount +1)
val = Datatable.RawValue("username","DS")
msgbox val
Next
hope it clear u...!
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / srinu
setShet = Datatable.Getsheet("Sheet Name")
rowcon=shet.getparameter("colum Name").getrowcount
msgbox rowcon
| Is This Answer Correct ? | 3 Yes | 5 No |
accept an email id & validate it .email id should not exceed 25 characters the mail id should contain 3 characters excluding domain name,@ and .(dot) the last 3 characters of the domain should be net,com or org
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
how to automatically update the sql server2005 database records when insert in vb6?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
write a vb script to add two 2*2 matrix
what is event handling?
In qtp, how to use XML files for framework. if the XML files are more Efficient than Excel files?
How to Import data from a file (file is on the desktop) to the data table
How to get the length of the string by making use of the string function?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
What is event handling in vbscript?
how to genarate a random numbers in vb?