xlApp = win32com.client.Dispatch('Excel.Application')  #打开excel进程
xlBook = xlApp.Workbooks.Open("d:\\1.xls") #读excel文件
xlBook.Close(SaveChanges=1) #关闭xlBook句柄

del xlApp #这个地方很重要,杀死excel进程是这个地方起作用

相关文章:

  • 2022-01-27
  • 2021-12-02
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-02-28
  • 2022-12-23
  • 2022-03-04
  • 2022-02-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案