I want to start using "optimized connection" feature of xlwings (v 0.11.4), but I would like to be able to kill Python process when I close the workbook (even if Excel instance is still running). I couldn't find any information on this in topic in xlwings documentation. Anyone had a similar problem and found a solution?
Asked
Active
Viewed 3,132 times
0
-
1make sure you clean up your global excel object references: https://stackoverflow.com/a/37571308/918626 – Felix Zumstein Jun 13 '18 at 09:42
-
My problem is with Python process (not Excel zombie) running until I close Excel instance. It looks like this, I open Excel (Python process does not yet exist), then I open a workbook, which within its AutoOpen function calls Python to start the environment). I see a new Python process starting and being up entire time this Excel instance is running. This Python process will only end when I close Excel instance. I would like however to have the same result (end Python process) when I close the workbook (with Excel instance still running). – matetam Jun 13 '18 at 13:01
-
1You can try to call the function `KillPy` which is part of the addin. – Felix Zumstein Jun 13 '18 at 15:24
1 Answers
0
The link below might be helpful where you can quit app directly (which will close and kill excel application).
I cannot close Excel 2016 after executing a xlwings function
Best Regards, Python Beginner