xlwings Lite vs. Python in Excel¶
Python in Excel turns the Excel grid into a 2-dimensional Jupyter notebook, while xlwings Lite brings the VBA experience into the modern age.
Company¶
Python in Excel is Microsoft’s official solution, generally available since 2024.
xlwings Lite is based on the popular open source package xlwings, which has been around since 2014 and which is developed by Zoomer Analytics GmbH, a company that focuses entirely on the combination of Python and Excel, see About.
Available packages¶
Python in Excel has a set of available packages, which may or may not include those that you actually need. There’s no way to install additional packages.
xlwings Lite allows you to install a wide range of popular packages that are not supported with Python in Excel. A few examples include polars, xgboost, duckdb, cvxpy, geopandas, etc.
Privacy¶
Python in Excel runs in Microsoft’s Azure cloud. Whenever you run a PY cell, it sends the content of the workbook to the cloud, runs it there, and sends the result back to Excel.
xlwings Lite runs entirely on the end-user’s machine without sending any data out. The only exception is Microsoft’s mandatory telemetry, which you can eliminate through self-hosting.
Performance¶
Python in Excel runs in Microsoft’s cloud with fixed processing capacity and introduces network latency for each execution.
xlwings Lite runs locally without network latency and can be much faster, depending on the processing power of your laptop.
Manual calculation mode¶
Python in Excel requires you to buy an add-on for USD 420 per year / user to be able to use manual calculation mode.
xlwings Lite allows you to use manual calculation mode for free.
Excel object model¶
Python in Excel can’t manipulate the Excel object model. This means, e.g., that you can’t add a new sheet or format the output as Excel table.
xlwings Lite gives you access to the Excel object model, so you can add new sheets and format the output as Excel table, etc.
Security¶
While Microsoft touts its cloud’s “enterprise security” for data protection, their security infrastructure has demonstrated vulnerabilities. In early 2024, a sophisticated cyber attack successfully compromised Microsoft’s systems, gaining access to emails of senior US government officials, as reported by CNN.
xlwings Lite runs in the secure sandbox of the browser, which powers modern Excel add-ins. No data is sent out, preventing any data leaks. For maximum security, xlwings Lite can be self-hosted on your own infrastructure, inside your corporate network.
Custom functions (a.k.a. User-defined functions UDFs)¶
Python in Excel doesn’t allow the definition of native custom functions.
xlwings Lite allows to define native custom functions.
Limited usage (#BLOCKED!)¶
Python in Excel blocks you after you’ve reached an undisclosed quota (there’s a daily and a monthly limit), see How to correct a #BLOCKED! error.
xlwings Lite doesn’t have any usage limitations.
Web API requests¶
Python in Excel blocks every network access, so you can’t pull in data from a web API.
xlwings Lite allows you to pull in data from web API with certain limits, see Web API Requests.
Price¶
The basic version of Python in Excel is included in your Microsoft 365 subscription. However, you can’t use manual calculation mode and you have daily and monthly usage limits, which are undisclosed, so you may be blocked at some point without warning. The Python in Excel add-on, which runs on a more a powerful hardware and allows manual calculation mode, costs USD 420 / year / user.
xlwings Lite is free for both personal and business purposes when installed via the official Excel add-in store. For self-hosting, xlwings Lite costs USD 5,000 / year without any limits regarding users or usage, see Pricing.
Compatibility¶
Python in Excel only works with Microsoft 365.
xlwings Lite works with Microsoft 365 as well as recent versions of permanent Office licenses such as Office 2024.
Opt-in vs. opt-out¶
Python in Excel can only be opted out by editing the Windows registry.
xlwings Lite is your choice: install it when you need it, remove it when you’re done with it.
Flexibility of data conversion¶
Python in Excel delivers every Excel range as pandas DataFrame via the
xl()
function.xlwings Lite has powerful converters that allow you to read in your data as pandas DataFrame, as list, NumPy array, etc., depending on what you need, including the ability to define custom converters.
Maximum script length¶
Python in Excel stores your Python code in Excel cells. This means that you can save a maximum of 8192 characters per cell and you need to break up long scripts into various cells, otherwise you’ll get the following error: “Save failed: You can’t use more than 8192 characters in a Microsoft Excel formula”.
xlwings Lite doesn’t have a limitation on script length.
Self-hosting¶
Python in Excel doesn’t allow self-hosting and forces you to share your data with their Azure cloud.
xlwings Lite offers self-hosting for maximum security and privacy.
Calculation order¶
Python in Excel is just a 2-dimensional Jupyter notebook. As such, it calculates the cells from top top bottom and from left to right. I.e., the order of cells matters, which isn’t true for anything else in a spreadsheet.
xlwings Lite offers automation scripts and native custom functions, so it doesn’t have to introduce such an anti-spreadsheet concept.