Can't close Excel completely using win32com on Python

后端 未结 4 610
轻奢々
轻奢々 2020-12-24 02:38

This is my code, and I found many answers for VBA, .NET framework and is pretty strange. When I execute this, Excel closes.

from win32com.client import Dispa         


        
4条回答
  •  借酒劲吻你
    2020-12-24 03:19

    Try this:

    wbs.Close()
    excel.Quit()
    del excel # this line removed it from task manager in my case
    

提交回复
热议问题