Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to get column count in datatable?




291
views
asked marvit August 20, 2014 02:51 AM  

How to get column count in datatable?


           

1 Answers



 
answered By Dharma   0  
To Retrieve the Column count Data Table :
Syntax :
Col_count= Datatable.GetSheet("SheetName").GetParameterCount
Example1:
Col_count= Datatable.GetSheet("Action1").GetParameterCount
msgbox "No. of columns used in "&Environment("ActionName")&" are : " &Col_count
To Retrieve the Column Names of Data Table :
Syntax :
Datatable.GetSheet("SheetName").GetParameter(Column Number).Name
Example1 :
Col_Name=Datatable.GetSheet("Action1").GetParameter(1).Name
msgbox " Column name is : "&Col_Name
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert