How do I run excel using all the default add-ins from Python win32com
import win32com
import win32com.client as win32
xl = win32.gencache.EnsureDisplatch('Excel.Application')
This fires up Excel, but for whatever reason none of the plugins load.
If Excel was already loaded, the plugins will stay loaded and be accessible.
Please advise.
Context: I'm scrapi开发者_如何学运维ng data from a worksheet that makes calls using a proprietary plugin. If the plugin doesn't load, all the cells I need to scrape just throw errors.
Perhaps you can add the code to access your plugin in a macro and then automate the macro from Python.
xl.Run("Book1.xls!Macro1")
xl = win32.gencache.EnsureDisplatch('Excel.Application')
typos here.
xl = win32.gencache.EnsureDispatch('Excel.Application')
精彩评论