{"id":2027,"date":"2026-04-27T07:32:33","date_gmt":"2026-04-26T23:32:33","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2027"},"modified":"2026-03-28T05:20:59","modified_gmt":"2026-03-28T05:20:59","slug":"how-to-use-applicationaddins-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationaddins-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.AddIns in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The Application.AddIns property in Excel&#8217;s object model provides access to the collection of add-ins currently available or installed. In xlwings, this functionality is exposed through the <code>api<\/code> property, which grants direct access to the underlying Excel COM objects. This allows Python scripts to programmatically inspect, manage, and interact with Excel add-ins, which are supplemental programs that extend Excel&#8217;s capabilities. Using xlwings, you can retrieve information about these add-ins, such as their names, installation status, and file paths, enabling automation tasks like checking for required add-ins before executing dependent macros or functions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax in xlwings:<\/strong><br>The property is accessed via the Application object. In xlwings, the Application is typically represented by the <code>app<\/code> object when you instantiate a connection to Excel. The syntax is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>addins_collection = app.api.AddIns<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This returns an <code>AddIns<\/code> collection object. From this collection, you can access individual <code>AddIn<\/code> objects by index or name. Key properties and methods of the <code>AddIn<\/code> object include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Name<\/code>: Returns the name of the add-in as a string.<\/li>\n\n\n\n<li><code>FullName<\/code>: Returns the full file path of the add-in.<\/li>\n\n\n\n<li><code>Installed<\/code>: A boolean property that gets or sets whether the add-in is installed (i.e., loaded in Excel). Setting this to <code>True<\/code> loads the add-in; setting it to <code>False<\/code> unloads it.<\/li>\n\n\n\n<li><code>Title<\/code>: Often returns the same as <code>Name<\/code>, but can be the display title.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To retrieve a specific add-in, you can use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>specific_addin = app.api.AddIns(\"Add-In Name\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or by index (1-based):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>first_addin = app.api.AddIns(1)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example Usage:<\/strong><br>Below is a practical xlwings code example that demonstrates how to work with the AddIns collection. This script lists all available add-ins, checks if a specific add-in is installed, and toggles its installation status.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\n# Connect to the active Excel instance\napp = xw.apps.active\n\n# Access the AddIns collection\naddins = app.api.AddIns\n\n# List all add-ins with their details\nprint(\"Available Add-Ins:\")\nfor i in range(1, addins.Count + 1):\n    addin = addins(i)\n    print(f\"Name: {addin.Name}, Path: {addin.FullName}, Installed: {addin.Installed}\")\n\n    # Check and manage a specific add-in, e.g., \"Analysis ToolPak\"\n    target_addin_name = \"Analysis ToolPak\"\ntry:\n    target_addin = app.api.AddIns(target_addin_name)\n    print(f\"\\nFound '{target_addin_name}'. Currently installed: {target_addin.Installed}\")\n\n    # Toggle the installation status\n    target_addin.Installed = not target_addin.Installed\n    print(f\"Toggled installation. Now installed: {target_addin.Installed}\")\nexcept Exception as e:\n    print(f\"Add-in '{target_addin_name}' not found or error: {e}\")\n\n# Note: Changes to Installed property take effect immediately in Excel.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Application.AddIns property in Excel&apos;s object model provides access to the collection of add-ins&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2027","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/comments?post=2027"}],"version-history":[{"count":2,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2027\/revisions"}],"predecessor-version":[{"id":3096,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2027\/revisions\/3096"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}