Set qtApp = CreateObject("QuickTest.Application") '
qtApp.Test.DataTable.ImportSheet FilePath, FilePath
Set qtOptions = Nothing
Set qtApp = Nothing
I want to add a sheet and then import a xls file to this sheet.but When run "qtApp.Test.DataTable.ImportSheet FilePath, FilePath" This Step,Qtp prompt "WrongNumber of arguments or invalid property assignment:'qtApp.Test.DataTable.ImportSheet'"Erro r
what should i do ?
Could be that you are adding the sheet to a different instance of QTP than the one to which you are importing the sheet.
You may also want to be sure that AddSheet is working and that the name of the source file sheet is correct.