0

I'm trying to build out a process to refresh a series of excel documents on a monthly basis. One part of this process will require refreshing data from an Excel Add-In (In my case this is an add-in called SmartView).

I can't find any info on how to pull a list of add-ins accessible to the pywin32 module. Is there a way to access and iterate through a list of Add-Ins?

Here's what I know works if you know the name of the Add-In:

import win32com.client as win32

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

helloWorldAddIn = xl.COMAddIns("HelloWorld") # HelloWorld is the name of my AddIn.

1 Answer 1

2

The Application.COMAddIns is actually a collection of COMAddIn objects, so you can iterate over the list of available add-ins like:

import win32com.client as win32

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

for addin in xl.COMAddIns:
    print(addin.description)
Sign up to request clarification or add additional context in comments.

1 Comment

That was it! Thanks Garett

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.