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 |
What is difference between Active screen and movie screen recorder in QTP 9.2?
How to write VB Script for selecting a particular row in a WebTable?
Mention the rules for using option explicit statement?
input values to accept 2 numbers & print the product, difference and sum using switch case
how to add the shared repository file to the script file while running the script manuall
How to create pull down menu box using vb script
Explain about filter expression?
how to check whether link is disabled in QTP??
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?
did any one attended interview in applabs if you had gone through plz tell me the procedure
How do you create a recordset object in VBScript?
Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...