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 |
compare the string without using stringcomp function?
Give examples where vb script can directly run on users system with windows as os?
write a vb script to find the size of d drive?
Mention how you can call vbscript functions?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
How to add actions in driver script to run those actions in QTP?
How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz
What are keywords in the vbscript language?
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
How will you get a random number between 0 and 1 in vbscript?
In what way program "hello world" you can write in vbscript?
How to open excel in vb script?