Forum Discussion

nancypnp's avatar
nancypnp
Occasional Contributor
11 years ago

DDT.Excel Error 'The Excel workseet "" doesnot exist

Hello,

I am working with DDT.Excel and when i am trying to execute following error is shown

 'The Excel workseet "" doesnot exist



and coded i worte is as below:




  Set RefFileDriver = DDT.ExcelDriver(RefFileName, RefSheetName)


  Set FileToCompareDriver = DDT.ExcelDriver(FileToCompare, SheetToCompare)






Where 

RefFileName = "C:\\Users\\Desktop\\zxcz.xls"

RefSheetName = sheetname



Anyone who can help me?

Thanks in advance

Nancy

 

5 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    We had problems moving tests from machine to machine because of the differences in that Users directory.   We ended up creating a directory named Resources on the drive with the TestComplete programs and putting our Excel files there.  This keeps the file name the same no matter where you run the tests.

     


    In this case,  your file name becomes


     


    RefFileName = Project.Path &"Resources\zxcz.xls"

  • nancypnp's avatar
    nancypnp
    Occasional Contributor
    i have given the the sheetname as "Distributed_Download"
  • simon_glet's avatar
    simon_glet
    Regular Contributor
    "C:\\Users\\Desktop\\zxcz.xls" does not exist.



    The path should be something like "C:\\Users\\loginName\\Desktop\\zxcz.xls" or "C:\\Users\\All Users\\Desktop\\zxcz.xls".



    Sincerely
  • nancypnp's avatar
    nancypnp
    Occasional Contributor
    Thank you..

    it works, its due to moving from machine to machine.