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 / 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 |
Post New Answer View All Answers
Which event is triggered when mouse focus comes out of an element in the vbscript language?
How are values assigned to string type and numeric type variables?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
Write a Script for ATM in QTP
give me any information abou vb script books learn quckly
What are the 2 ways in which a variable can be declared in the vbscript language?
Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?
How will you get the largest subscript of an array in vbscript?
What is the main difference between function and sub-procedure?
What is the difference between javascript and vbscript?
Explain about vb script?
Mention how to assign a date value to a variable?
Explain about filter expression?
How can you create an object in vbscript?
How to add actions in driver script to run those actions in QTP?