12-31-2009, 10:54 PM
All,
I am trying to do two things. Simply import data into a datatable from Excel 2007. So I used this:
Couple of questions:
1) On - Datatable.AddSheet "CategoryReportData" - should I see this datatable in QTP? Currently, QTP executes the statement with no errors but I don't see that it's added.
2) When QTP gets to the next statement it fails with :
A general error occurred while importing sheet CategoryReportData from file C:\CategoryTotalReport.xlsx to sheet CategoryReportData.
I can't figure this out. Any idea?
Thanks - Charles
I am trying to do two things. Simply import data into a datatable from Excel 2007. So I used this:
Code:
Datatable.AddSheet "CategoryReportData"
DataTable.ImportSheet "C:\CategoryTotalReport.xlsx",1,"CategoryReportData"
Couple of questions:
1) On - Datatable.AddSheet "CategoryReportData" - should I see this datatable in QTP? Currently, QTP executes the statement with no errors but I don't see that it's added.
2) When QTP gets to the next statement it fails with :
A general error occurred while importing sheet CategoryReportData from file C:\CategoryTotalReport.xlsx to sheet CategoryReportData.
I can't figure this out. Any idea?
Thanks - Charles