Zombie process using xlwings

2019-03-02 07:11发布

When I use xlwings to automate stuff in excel, I still have EXCEL zoombie process running even if I quit the application (with wb.Application(wb).quit()).

Thus, when I try to re open my excel file that bugs. I have to manually kill the excel application.

edit : I use the xlwings 0.7.0

标签: xlwings
1条回答
对你真心纯属浪费
2楼-- · 2019-03-02 07:34

The issue is that wb is a global reference to your workbook which still exists even after executing the quit command. Excel sees that it is being referenced (through COM) and thus refuses to shut down properly.

For now, you can manually clean up your workbook object after quitting: del wb. In the next major release of xlwings, we'll also provide a new Workbook.kill() command that will get around this issue.

查看更多
登录 后发表回答