Zombie process using xlwings

冷暖自知 提交于 2019-12-11 05:15:41

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/37548171/zombie-process-using-xlwings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!