Am trying to import excel file to data table via script in QTP 9.2 from QC 9.0
If open Associate Reposotories from Resources menu, and locate the file and copy the path, am getting ..
'[QualityCenter] Subject\QA Automation\GUI Automation\GUI_Test_Data.xls'
In the script am using
PathFinder.Locate "[QualityCenter] Subject\QA Automation\GUI Automation\GUI_Test_Data.xls"
DataTable.Import "[QualityCenter] Subject\QA Automation\GUI Automation\GUI_Test_Data.xls"
'PathFinder.Locate' statement is executing fine
but 'DataTable.Import' throws an error saying operation failed, path does not exist.
then for DataTable.Import i have tried modifying the paths like this:
1. "[Quality Center] Subject\QA Automation\GUI Automation\GUI_Test_Data.xls"
2. "[QualityCenter]Subject\QA Automation\GUI Automation\GUI_Test_Data.xls"
3. ("[QualityCenter] Subject\QA Automation\GUI Automation\GUI_Test_Data.xls")
and so on... but to no use
Please correct me where am i going wrong
You cant do an "Import" from QC.
This is an issue that has been discussed earlier here. The forum would like you to do a search and post [img]/images/graemlins/smile.gif[/img].
You have a workaround for it.
Download the attachment and save in local disk(using OTA)
Refer the attachment from the local disk and if you want the sheet back in QC upload the same to QC.
-- Here to Learn and share ---
am not sure what OTA is...!
Can you put a sample code and help me win the Bet!!!
Senior Members & Veterans,
I understand what you were going through. [img]/images/graemlins/smile.gif[/img]
Neethu:- try to get something done yourself and approach for help if you are stuck. Nobody would want to do all the work for you.
Anyways I am giving you something that would help you to find answers:
OTA stands for Open Test Architecture. QC's documentation part would help you with that.
Also if you have a single sheet rather than multiple sheets you could connect to tha sheet as your default sheet. Refer the 'Automation Reference' for that.
I am attaching a file which has some sample code for working wiht TD.
I got these from the support site and advice you to look at KB article "29487" in support site under TD for more details.
Thank you so much naveen..
I have been searching heaven and hell to solve this..
will try to implement your way to use values form excel sheet in QC for QTP scripts