01-28-2011, 08:53 PM
Use the statement
DataTable.ImportSheet SheetPath, SheetSource, Sheetdestination statement in your QTP code to import the excel sheet to your test case e.g.
DataTable.ImportSheet "c:\test.xls","TestData","Login"
This statement will import data from TestData worksheet of test.xls excel sheet to data table of Login action. if you want to import to global sheet then use
DataTable.Import "c:\test.xls"
DataTable.ImportSheet SheetPath, SheetSource, Sheetdestination statement in your QTP code to import the excel sheet to your test case e.g.
DataTable.ImportSheet "c:\test.xls","TestData","Login"
This statement will import data from TestData worksheet of test.xls excel sheet to data table of Login action. if you want to import to global sheet then use
DataTable.Import "c:\test.xls"