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
What is Procedure or Subroutine in VB Script?
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
How to assign a numeric value to a variable?
how to set one column as primary key in QTP and fetch values accordingly
Explain about the functionality of vb script?
How to create a cookie using vbscript?
How can you create a file object to work with the files in the vbscript language?
Write a code to print numbers from 5 to 0?
Explain the scope of the variables using dim, public, and private keywords respectively.
how does vb script help in web page designing? explain with example.
How many types of procedures are available in the vbscript language?
Mention how to create a cookie using vbscript?
Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks
Which event is triggered when mouse focus comes out of an element in the vbscript language?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me