columnname
   a1
   a2
   a3
-----------------   ------------------  --------------------
| Sheetname |  sheet2       |        sheet3  |
----------------  -------------------  --------------------

All  sheets in work book==>Excel of name==> TestData

consider in work sheet name -->'Sheetname' the required data is in
column name ---> 'columnname"



  pth ="E:\AutomationFrameWork\TestData.xls" ' say you keept the data
in 2 nd sheet in external excel
             of name TestData

################################################################################

  Datatable.AddSheet("Sheetname")
  Datatable.ImportSheet pth ,"sheet2","Sheetname" '  Import the
2ndSheet of external Excel Sheet to
     'Sheetname'  Sheet of Run time Datatable
  rowcount=DataTable.GetSheet("Sheetname").Getrowcount ' get global
sheet from the Run Time data Table
  Datatable.SetCurrentRow(1)

   For i =1 to rowcount '  Iterate up to the Number of rows in
Imported  sheet

              ABC=DataTable.Value("columnname","Sheetname")'  suppose
in 'Sheetname' sheet  required data
                       is  in column name 'columnname'

              RunAction ("ContarctHomePage", oneIteration ,ABC)
              Datatable.SetNextRow() ' set next row in Imported sheet
as current Active row

   Next
################################################################################

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to