It doesn't run locally, but rather uses Azure cloud.<p>For local python in a spreadsheet, LibrePythonista allows running IPython code in a LibreOffice spreadsheet<p><a href="https://news.ycombinator.com/item?id=41443012">https://news.ycombinator.com/item?id=41443012</a>
See here for some insights:<p><a href="https://news.ycombinator.com/item?id=40656125">https://news.ycombinator.com/item?id=40656125</a>
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.
I've been stuffing JS and API calls into Google Sheets cells and for small use cases its great!<p>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
IIRC, Python had a win32 binding over 20 years ago and MS-Office 2000 onwards was scriptable via DCOM.<p>So with a little bit of effort this has already been a thing for 2 decades.<p>Not entirely sure how you move from plain win32 to DCOM, and it's probably a bit more difficult than WSH, but it should be doable.
> 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.<p>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.<p>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).<p>Python is soooo much easier to read than the built-in formulas.<p>I'm excited to try this out!
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.
> Python code used by Excel runs on the Microsoft Cloud ....<p>Nope, not only there is the security issue, regardless of what is promised, good luck editing those Excel files in flights, or train travels.