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 DispatchEx
excel = DispatchEx('Excel.Application')
wbs = excel.Workbooks
wbs.Close()
excel.Quit()
wbs = None
excel = None #
But when I do the following, it does not close.
excel = DispatchEx('Excel.Application')
wbs = excel.Workbooks
wb = wbs.Open('D:\\Xaguar\\A1.xlsm')
wb.Close(False)
wbs.Close()
excel.Quit()
wb = None
wbs = None
excel = None #
I found some possible answer in Stack Overflow question
Even it does not bother me if I can just get the PID and kill it.
May be not the proper way, but a workround is: