How to run excel using all default add-ins from python win32com

import win32com
import win32com.client as win32

xl = win32.gencache.EnsureDisplatch('Excel.Application')

This starts Excel, but for some reason, none of the plugins load.

If Excel is already loaded, the plugins will remain loaded and available.

Please inform.

Context: I clear data from a worksheet that makes calls using its own plugin. If the plugin does not load, all the cells that I need to clear just throw errors.

+3
source share
2 answers

Perhaps you can add code to access your plugin in a macro, and then automate the macro from Python.

xl.Run("Book1.xls!Macro1")
0
source

xl = win32.gencache.EnsureDisplatch ('Excel.Application')

typos here.

xl = win32.gencache.EnsureDispatch ('Excel.Application')

0
source

All Articles