Forum Discussion

Azeddin_Margani's avatar
Azeddin_Margani
Contributor
8 years ago

Excel sheet is locked for editing

Hi,

 

Could someone help, please. I'm running few looped tests reading data from excel sheet. When the execution is done, the excel sheet remains locked for some reason. I know there is a code to close the excel sheet if DDT driver is used but I'm not using it.  Is there a JScript command to close excel after the execution is finished?.

 

Regards,

A.M.

2 Replies

  • Much as I hate to state the obvious:

     

    "I know there is a code to close the excel sheet if DDT driver is used but I'm not using it"

     

    Would it not be easier to use the code that exists for exactly this?!?!?!

     

    Easiest way to remove the lock (as it sees TestComplete as the user) is simply to close TestComplete. As long as it remains open, and you haven't closed the connection cleanly, it will continue to see that Excel instance as "in use" by "user" TestComplete. Happens to me sometimes if I kill a run halfway through.

  • NisHera's avatar
    NisHera
    Valued Contributor

    May be this discussion would be useful.....

     

    How do you open up excel ? probably if you can share some of your code, some body could help