Forum Discussion

paul_igoe's avatar
paul_igoe
Contributor
9 years ago

TC11 - cannot keep excel open while using DDT.ExcelDriver

Hi,

 

I have a project that uses DDT.ExcelDriver.

With TC10, I could keep the excel file open in Excel while running the project in TestComplete.

 

After upgrading to TC11, I get JScript runtime error "An attempt to work with a closed driver"

I can only run the project if I close the excel file (not enough to save any changes)

Running TC as Admin doesnt help.

 

Its a real nuisance to have to continually close/reopen the file as I'm working on the project.

Any workaround for this?

 

TC11.3

Windows 8.1

Excel 2016

 

Thanks,

Paul

4 Replies

  • I find that I can have the Excel file open and run a test as long as I have no pending changes to the file, but this behavior is the same for TestComplete 10 and TestComplete 11.

     

    I've never seen that error message before.  Do you see this problem using the code example found on the ExcelDriver Method page?  If not, post the (simplest) example code that still shows the problem.

    • paul_igoe's avatar
      paul_igoe
      Contributor

      Hi,

       

      The example on the Excel Driver Method page also fails for me (for both UseACEDriver=true & false)

      Also, even with the excel closed, I get the same error with parameter UseACEDriver=false. Its ok with true.

       

      Attached my project with the Excel Driver Method page example (slightly changed).

       

      By the way, when I dont get the error, the first row is skipped (see the current project log)

       

      Regards,

      Paul

      • ghuff2's avatar
        ghuff2
        Contributor

        I've found with TC11 I sometimes get this error even if the Excel file isn't open. I have to close and reopen TC to get it working again. Never happened with TC10, not sure what changed. Always gives me the error if the Excel file is open. I have the ACEDriver set to true as well.

         

        Guess this doesn't solve the problem, but figured I'd add my experience with it here. Minor annoyance for me, if it's a big deal for you you might want to put in a support ticket to find out if there's a workaround.

  • TCARREON14's avatar
    TCARREON14
    New Contributor

    We are having the same issue. I did notice that the exact same script works when running our automated scripts on Windows7 64bit with Office 2013, however when we run on Windows10 with Office 2016 we encounter the error you stated.

     

    Our script clicks a link that launches Excel then we try to use the ddt.exceldriver to navigate to cell. We get the error you mentioned.