Hi all
I have a problem importing my excel sheets into QTP datatabels, here is my code:
I get this error message for the last line:
A general error occurred while importing sheet TestData from file C:\QTP\Training\Calc\Calc.xls to sheet Blad1.
Line (18): "datatable.ImportSheet xlPath, xlSheet, "TestData""
The strange thing is that i'm trying to import xlSheet to TestData not the way around as said in the error message!
P.S. the path to the excel file is correct
I have a problem importing my excel sheets into QTP datatabels, here is my code:
Code:
xlPath = "C:\QTP\Training\Calc\Calc.xls"
xlSheet = "Blad1"
datatable.AddSheet ("TestData")
datatable.ImportSheet xlPath, xlSheet, "TestData"
I get this error message for the last line:
A general error occurred while importing sheet TestData from file C:\QTP\Training\Calc\Calc.xls to sheet Blad1.
Line (18): "datatable.ImportSheet xlPath, xlSheet, "TestData""
The strange thing is that i'm trying to import xlSheet to TestData not the way around as said in the error message!
P.S. the path to the excel file is correct