Forum Discussion
- xuerzj9 years agoNew Contributor
Thanks for your input.
It is not working for me. When a excel driver is created, the excel object does not exist.
Any suggestion? Thank you.
- leandroaraujoso9 years agoContributor
Hi xuerzj,
You could create an OnStopTest event. In this event you would check weather or not exists an open Excel connection and then close it.
Regards,
Leandro de Araújo Souza
- xuerzj9 years agoNew Contributor
Hi Leandro,
Thanks for your input. Actually I don't know how to check weather or not a excel driver exists.
I use the following command to create and close excel drivers.
Set Driver = DDT.ExcelDriver(pathExcelResource, strDriverName, TRUE)
some code ' error happens before closing the driver
Call DDT.CloseDriver(strDriverName)
Regards,
Jie
- Ravik9 years agoSuper Contributor
Hi
Try this simple code, it will close your all excel
Sub CloseExcel
Do whilen Sys.Process("EXCEL").Exists = True
Sys.Process("EXCEL").Close
Loop
End Sub
It is may help you.
(In previous code you got error becouse, you may not may excel process in Name Mapping.)
- xuerzj9 years agoNew Contributor
Hi Ravik,
I use the following command to create and close excel drivers. Sys.Process("EXCEL").Exists always return false.
Set Driver = DDT.ExcelDriver(pathExcelResource, strDriverName, TRUE)
some code ' error happens before closing the driver
Call DDT.CloseDriver(strDriverName)
Regards,
Jie