杀excel进程:
app = win32com.client.Dispatch("Excel.Application")
这个是激活
Doc = app.Workbooks.Open(filepathname)
Sheet = Doc.Sheets(sheetNo)
这个是用表格的
app.Quit() 这个是退出
Sheet=None
Doc=None
app=None
while not app==None:
    pythoncom.PumpWaitingMessages()
尤其是最后一个是必须的 
否则app没有退出完,你再打开另外一个sheet就会出错

相关文章:

  • 2021-11-09
  • 2021-12-09
  • 2021-06-05
  • 2021-12-26
  • 2022-12-23
  • 2021-12-31
  • 2021-06-19
猜你喜欢
  • 2022-01-20
  • 2021-08-30
  • 2021-12-23
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
相关资源
相似解决方案