Importing datatable at run time from HPQC
Is there a way to import an XLS worksheet during run time?
The path of the worksheet is [QualityCenter] Subject\Automation Library\Input Data Files\XLS_sheet.xls
When we performed our initial coding (without HPQC), we used the datatable.importsheet method.
We used the following code
Datatable.ImportSheet "<<PATH>>\XLS_Sheet.xls", 1,"global"
This allowed us to import sheet number 1 into Global table.
Now, we want to use HPQC
I went to File->Settings->Resources
Data Table->Other Location
In this, I browsed to [QualityCenter] Subject\Automation Library\Input Data Files\XLS_sheet.xls
This picks up the entire worksheet.
Is it possible to import worksheet at runtime from HPQC?
Re: Importing datatable at run time from HPQC
I picked the code from http://www.sqaforums.com/showflat.php?Ca...true#Post491889
QCpath = "[QualityCenter] Subject\MainProject\Lib"
FileName = "MainLib.vbs"
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
TempFileName = PathFinder.Locate(FileName)
Set App = Nothing
I changed the path and the file name
instead of ExecuteFile TempFileName, I typed in datatable.importsheet TempFileName, <column number>, "Global"
Seems to be working fine.
I will try to implement this code in our scripts
If you know a better/another solution, please do let me know.