Forum Discussion

BillA603's avatar
BillA603
Contributor
10 years ago
Solved

Script [from Keyword Test] has issue with XLS Data; engine could not find the object 'Sheet1$

I have a few Data-Driven Keyword Tests that I converted to Script and am having issues executing them. The error message [below] concerns the XLS Data source. I have confirmed that my Keyword Test still runs fine. 

 

The script line that fails is the first reference to the Data storage object variable.

Call Project.Variables.LtcTest17.Reset 

 

Is there a different syntax needed when using Data-Driven XLS input in a Script? 

 

5.jpg

  • ::looks around and fails to find Bag O' Wisdom::

     

    Try double clicking on your project name in the Project Explorer and see if you get the tabs back on the bottom.  Here's what mine looks like, and the DDT variables that were translated are all in the Temporary Variables list.

     

     

     

    scriptvariables.png

     

     

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    The ones I have converted were fine syntax-wise, but my Excel file turned out to be in a different place than TestComplete expected.  Double-check the path definition in the Project variable and go look at the path it's using and make sure your file is actually there.  

    • BillA603's avatar
      BillA603
      Contributor

      Hi Marsha,

      I am new to TestComplete, so please bear with me. The only way I know to access the Project variables is via the tab at the bottom of the Workspace pane. Note: There are 2 other Tabs here as well, Test Steps and Parameters. When I view the Variables Tab, I only have one variable declared and that is my XLS file. The value is correct and does not look to have been changed. This Tab only appears when I select the Keyword Test in my Project Explorer.

       

      When I select the Script Tab in the Workspace, the Test Steps, Variables and Parameters tabs go away. Where should I look for variables associated with the Script?

       

      I am wondering if perhaps I set up my XLS data variable at the Keyword level instead of project level.

       

      I await your great wisdom.

      :-)

       

      Bill

       

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        ::looks around and fails to find Bag O' Wisdom::

         

        Try double clicking on your project name in the Project Explorer and see if you get the tabs back on the bottom.  Here's what mine looks like, and the DDT variables that were translated are all in the Temporary Variables list.

         

         

         

        scriptvariables.png