How to get Active workbook instance – Python

Home / python / How to get Active workbook instance – Python

Question:
I am trying to build an app in python to open the excel files. We can get this done using Dispatch/DispatchEX. But, as per my requirement, I need to open the file in an excel window which was selected by the user. In short, the excel file has to be opened in the Active workbook. I tried
win32com.client.GetActiveObject("Excel.Application")

but it doesn’t work. Any suggestions please


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *