{"id":2109,"date":"2026-06-07T07:26:54","date_gmt":"2026-06-06T23:26:54","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2109"},"modified":"2026-03-28T07:09:16","modified_gmt":"2026-03-28T07:09:16","slug":"how-to-use-applicationfileconverters-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationfileconverters-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.FileConverters in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <strong>FileConverters<\/strong> property of the <strong>Application<\/strong> object in Excel provides a list of file converters that are currently installed and available for use. This is particularly useful when you need to programmatically determine which file formats Excel can open or save through external converters, such as older file types (e.g., Lotus 1-2-3, Quattro Pro) or specialized formats. In xlwings, this property can be accessed to retrieve information about these converters, enabling automation tasks that depend on specific file format support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Functionality:<\/strong><br>The <code>FileConverters<\/code> property returns a two-dimensional array (list of lists in Python) that contains details about each installed file converter. Each converter entry typically includes the converter&#8217;s descriptive name, the file extension it handles, and a class identifier. This information can be used to check for the availability of a converter before attempting to open or save a file in a non-native format, ensuring compatibility and preventing errors in automated workflows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax in xlwings:<\/strong><br>In xlwings, you access the <code>FileConverters<\/code> property through the <code>app<\/code> object, which represents the Excel application. The syntax is straightforward:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app.api.FileConverters<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This returns a Variant array in Excel&#8217;s object model, which xlwings converts into a Python list. The array is structured as a collection of sub-arrays, where each sub-array corresponds to one converter. The elements within each sub-array represent:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Index 0:<\/strong> The converter&#8217;s descriptive name (e.g., &#8220;Lotus 1-2-3&#8221;).<\/li>\n\n\n\n<li><strong>Index 1:<\/strong> The file extension associated with the converter (e.g., &#8220;.wk3&#8221;).<\/li>\n\n\n\n<li><strong>Index 2:<\/strong> A class identifier or internal number for the converter.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If no converters are installed, the property returns <code>None<\/code> or an empty array in Python, depending on the Excel version and configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code Examples:<\/strong><br>Here are practical examples using xlwings to work with the <code>FileConverters<\/code> property:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Retrieve and list all installed file converters:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\n# Connect to the active Excel instance or start a new one\napp = xw.apps.active\n\n# Get the file converters\nconverters = app.api.FileConverters\n\n# Check if converters exist and iterate through them\nif converters:\n    for converter in converters:\n        print(f\"Name: {converter&#91;0]}, Extension: {converter&#91;1]}, Class ID: {converter&#91;2]}\")\nelse:\n    print(\"No file converters installed.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This code prints details for each converter, helping you audit available formats.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Check for a specific converter by file extension:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\napp = xw.apps.active\nconverters = app.api.FileConverters\ntarget_extension = \".wk3\" # Example for Lotus 1-2-3 files\n\nfound = False\nif converters:\n    for converter in converters:\n        if converter&#91;1] == target_extension:\n            print(f\"Converter found: {converter&#91;0]} for {target_extension}\")\n            found = True\n            break\nif not found:\n    print(f\"No converter for {target_extension} is installed.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This example verifies support for a particular file type before proceeding with operations.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Use in a function to validate file format support:<\/strong><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\ndef is_converter_available(extension):\napp = xw.apps.active\nconverters = app.api.FileConverters\nif converters:\n    for converter in converters:\n        if converter&#91;1].lower() == extension.lower():\n            return True\n        return False\n\n# Example usage\nif is_converter_available(\".slk\"):\n    print(\"SYLK format is supported.\")\nelse:\n    print(\"SYLK format is not supported.\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This function can be integrated into larger scripts to handle file conversions dynamically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The **FileConverters** property of the **Application** object in Excel provides a list of file conve&#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-2109","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2109","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=2109"}],"version-history":[{"count":2,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2109\/revisions"}],"predecessor-version":[{"id":3227,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2109\/revisions\/3227"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}