Yup, complete with free and paid tiers of service:
> The Python in Excel add-on license includes everything in Python in Excel for Microsoft 365, plus premium compute and more calculation mode options. Premium compute means faster Python formula calculation times. With the additional calculation mode options, you can switch between manual, partial, or automatic calculation modes to control when and how often your workbooks recalculate Python formulas.
They had a chance to charge banks and other financial institutions even more money by letting them run their own local python installations but they missed it.
Wouldn't be useful since most banks use python as a wrapper around their c++ quant libraries. They wouldn't want to ship that onto azure, even if it's private.
It runs pretty much as described - you enter `=py` and it becomes a place to dump python code directly without configuring anything. The "catch" is it runs in the cloud and you need to buy the appropriate license level.
from what I understand from seeing youtube videos of it in action, you can use python functions libraries for the calculation part, but one of the strenghts of VBA was that you could interact with the Excel software itself, and that bit hasn't been replicated in python.
people liked they could set up scripts in VBA for automating routine tasks, but hated the VBA language syntax, from what I've understood, and wished they could program those functions in some more popular language like Python etc. But that isn't what this is.
I've been stuffing JS and API calls into Google Sheets cells and for small use cases its great!
When you get very complicated flows, of one cell pointed to another cell, it becomes a massive mess. It's hard to debug and there's no way to "linearize" the flow into something more legible, and even harder to log everything. I hope Python in Excel figures out how to get over those hurdles
> Python code used by Excel runs on the Microsoft Cloud with enterprise-level security as a compliant Microsoft 365 connected experience, just like OneDrive. The Python code runs in its own hypervisor isolated container using Azure Container Instances and secure, source-built packages from Anaconda through a secure software supply chain. Python in Excel keeps your data private by preventing the Python code from knowing who you are, and opening workbooks from the internet in further isolation within their own separate containers. Data from your workbooks can only be sent via the built-in xl() Python function, and the output of the Python code can only be returned as the result of the =PY() Excel function. The containers stay online as long as the workbook is open or until a timeout occurs. Your data does not persist in the Microsoft Cloud.
This is disappointing. A much easier way to 'keep your data private' would be to run it locally. Surely a bundled Python interpreter run inside a sandbox that prevents network access would be just as secure, and cheaper for Microsoft since they don't have to run any Azure resources to support it.
I've wanted this for years. I think the best use cases are going to be really boring.
If you've ever written a spreadsheet of meaningful complexity, you've probably been forced into a disastrous mess of nested IF statements (or helper columns).
Python is soooo much easier to read than the built-in formulas.
I expect this to become a compatibility nightmare in the long run, as new Python versions and library versions come and go. Also, this is cloud-only, which means your Excel documents won’t work standalone anymore. It’s a way for Microsoft to lock you in to their subscriptions.
This is a mistake. Python tooling is a sandpit. Complicated Excel spreadsheets are another sandpit. Additionally, you can't evaluate your spreadsheet formulas if you don't have Azure access, and now you have to worry about the "cloud" permissions and storage.
In general I'm very optimistic about the usefulness of AI to programmers but I can't think of much worse than an Excel sheet that's bundles a bunch of AI generated Python code from a quality assurance/correctness point of view!
I worked for a place a few years back that had stuff that was in C++/DCOM and written by someone snooting cocaine all day (both performance boosters) that the front end was an Excel spreadsheet. Now that was fragile.
I just can’t imagine what I can do here that I can’t do with a Python script using Pandas. Maybe visualization of data using Excel, in a way that makes it easier for boomers/accountants to understand?
basic interop like fetching data from s3 bucket, formatting it and showing as a table in excel would be a good use case, but not sure serverside python is needed for that.
more interesting idea could be using Excel as a jupyter-like front-end for the Python kernel. Imagine excel as a jupyter
Yeah, I think it's the compatibility with 'business language' for collaboration.
Most white-collar workers know how to use Excel to a really basic level of proficiency. Not many people know how to parse Python code.
It's also just a lot easier to work quickly in Excel. I dual boot Linux and Windows on my laptop so that I can have Windows keyboard shortcuts in Excel. If I need to do some lightweight financial modeling or analysis, it's dramatically faster (10x or more) for me to build a spreadsheet than write some Python/R code from scratch.
For local python in a spreadsheet, LibrePythonista allows running IPython code in a LibreOffice spreadsheet
https://news.ycombinator.com/item?id=41443012