--- id: xlwings version: "0.36.14" license: BSD 3-clause license_treatment: permissive maintenance: active --- # xlwings — Make Excel fly: Interact with Excel from Python and vice versa. License: permissive · Maintenance: active · Downloads: 990.2K/mo ## What it is and what it does xlwings is a Python library that bridges Excel and Python, letting you automate Excel workbooks from Python scripts and replace VBA macros with Python code. It provides a syntax close to VBA for reading, writing, and manipulating Excel objects, and supports numpy arrays and pandas DataFrames natively for data exchange. The open-source version (this package) includes scripting, macro replacement, and UDF support on Windows; it works on Windows and macOS and requires a local Excel installation. The package has been maintained since 2014 and is actively developed. It depends on pywin32 for Windows integration, psutil for system utilities, and appscript for macOS support. The PRO tier adds server-based deployment, template-based reporting, and faster Excel reading, but those features are not included in this open-source distribution. Use it for: - Automate repetitive Excel tasks—opening workbooks, populating cells, running calculations—from Python without writing VBA. - Replace legacy VBA macros with Python code for better maintainability, testing, and version control. - Build Python-based user-defined functions (UDFs) for Excel on Windows, letting spreadsheet users call Python logic directly from cells. - Exchange data between Python and Excel—read pandas DataFrames from workbooks or write analysis results back to spreadsheets. - Integrate Excel into Python data pipelines, treating workbooks as data sources or outputs in a larger automation workflow. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. xlwings lets you call Python from Excel and vice versa, automating Excel workbooks with Python code instead of VBA, and writing Python-based user-defined functions for spreadsheets. Yes. xlwings is actively maintained, has low install friction, carries a permissive BSD license, and solves a real problem—bridging Excel and Python without VBA. It's in the top 5000 PyPI packages by downloads. Install it if you need to automate Excel from Python or replace VBA macros; skip it only if you don't use Excel or prefer server-based alternatives. ## Install pip install xlwings uv add xlwings poetry add xlwings ## Installing xlwings Before you install: Low install friction with a pure-wheel distribution. Active maintenance—released 4 days ago with a commit history through 2026-08-14. Depends on pywin32, psutil, and appscript, which are standard system-integration libraries. License in practice: BSD 3-clause permissive license on the open-source package. The PRO tier is dual-licensed under PolyForm Noncommercial (free for noncommercial use) or a commercial license requiring a paid plan; this package is the open-source base without PRO features. Quickstart: pip install xlwings import xlwings as xw wb = xw.Book('myfile.xlsx') ws = wb.sheets[0] ws['A1'].value = 'Hello from Python' Requires an Excel installation (Windows or macOS); pywin32 on Windows requires Visual C++ build tools or a pre-built wheel. Verify before relying: - Whether numpy and pandas integration works out-of-the-box or requires those packages to be installed separately. - Whether UDF support (Windows-only per description) is included in this open-source version or requires PRO. - Specific macOS and Windows version compatibility beyond Python 3.9+. ## Package facts - License: BSD 3-clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 990.2K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python excel automation, call python from excel, excel vba replacement, python spreadsheet scripting, excel macros in python, pandas dataframe to excel, user defined functions excel, excel-automation, vba-replacement, office-integration [View on SkillFed](https://skillfed.io/packages/xlwings) · [View on PyPI](https://pypi.org/project/xlwings/)