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
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
How will you check that a variable is an array in vbscript?
Explain sga memory structures?
Mention how you can call vbscript functions?
Which operator can be used to do an xor operation in vbscript?
How to write functions and sub in vb script?
Is VB Script Case sensitive or Case insensitive?
I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.
Which loop is used in case of arrays in the vbscript language?
Which date function is used in the vbscript language to find the difference between the 2 dates?
Explain the asc function?
How are comments handled in the vbscript language?
Mention what is vbscript procedures?
Explain about the asc function?
Explain about vb script?