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 |
i need to sort the data using qtp script for this how i need to write a qtp script
write a Vb script to find a whther a selected drive exits.
To get data from table which method will be used in QTP
Write a program to create a Dynamic array of size 5 elements and display all the elements.
What is the difference between VBScript and JavaScript?
What are keywords in the vbscript language?
What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?
What is the equivalent of VBScript?s On Error In Jscript ?
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
w r p syed then output was deys and click eysd and click ysde and click sdey and click deys and click eysd............
write a vb script to display the reverse of vbs
did any one attended interview in applabs if you had gone through plz tell me the procedure