Custom Functions ("UDFs") are now available on all platforms, including macOS and Web: Check out the docs!
Python for Excel
and Google Sheets
Latest xlwings release: v0.30.8
xlwings is an open-core spreadsheet automation package with a beautiful API. It's a sane alternative to VBA macros/UDFs and Power Query and works across Excel on Windows and macOS, Excel on the Web, and Google Sheets. xlwings is easy to deploy, has powerful reporting features, and comes with an ultra fast file reader that doesn't require an Excel installation.

What Our Users Say

We use xlwings to automate the data feeds of one of our analytical spreadsheet tools, which saves us 1–2 days of tedious manual work every month. Data sources include REST APIs, CSV files via SFTP, and web scraping.
Jolanda Stadelmann, Founding Partner, zCapital

xlwings has saved me hundreds of hours in my current role. I replaced the VBA reporting with it and instead of taking 20–30 hours a month I can get the reports run in 6–7 hours.
Adam Wood, CFA, Analyst at a large U.S. custody bank
Get the O'Reilly Book
The book introduces you to:
Python, pandas, OpenPyXL, XlsxWriter, pyxlsb, xlrd, xlwt, xlutils, and xlwings as well as Jupyter notebooks and Visual Studio Code. It is available in English, French, Trad. Chinese, Simpl. Chinese, Korean, Serbian, Polish, and German.
You're in good company






INTERACTION / AUTOMATION
Leverage Python's scientific stack for interactive data analysis using Jupyter Notebooks, NumPy, Pandas, scikit-learn etc. Or use xlwings to automate Excel reports with Python (Windows & Mac).
MACROS AND EXCEL TOOLS
Write Excel tools with Python instead of VBA and call your code directly from within Excel, e.g. via a button on the sheet. This also works great for prototyping web apps (Windows & Mac).
USER DEFINED FUNCTIONS
Write (array) UDFs in a breeze by taking advantage of all the functionality already available in libraries like NumPy and Pandas. Since v0.10, dynamic array formulas are supported (Windows only).
REST API
Expose your workbooks via REST API and access them from other computers in your corporate intranet or over the web. See the REST API docs.