How can I force python(using win32com) to create a new instance of excel?

后端 未结 2 1614
失恋的感觉
失恋的感觉 2020-12-15 08:44

I\'m automating some excel related tasks which take a long time.

I\'m creating an excel instance using:

excel = win32.gencache.EnsureDispatch(\'Excel         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 09:05

    Why don't you do it like this?

    from win32com import client
    excel=client.Dispatch("Excel.Application")
    

提交回复
热议问题