| || |
Not able to read excel file from QC using QTP script.
this is my first question on QTP.
Problem: I have created a new resource "sfds" in resource/test folder under "test resources" tab of QC. and uploaded a temp.xlsx file in sfds.
I am trying to access it using qtp script which i am running from QC, but it is saying file doesn't exist ( I wrote it if file doesn't exist).
If i give location of my machine and run it using QC then it works fine.
I am trying following code:
Set ExcelObj = CreateObject("Excel.Application")
Set FileExistObj = CreateObject("Scripting.FileSystemObject")
boolFileExist = FileExistObj.FileExists(ExlFile)
Set FileExistObj = Nothing 'release an object
If not boolFileExist Then
Print "excel file: " &ExlFile&" doesn't exist at "
I also tried with ExlFile="[QualityCenter] Resources\Test\sfds\temp.xlsx" but no solution.
Could you please help me.
It would be great help!
And see if it helps