News for hackers. Stuff that matters.
Re:Microsoft is bringing Python to Excel by cardamomo on Tuesday August 22, 2023 @09:25AM (#37222375)
That caught my attention too! I'm curious why they would choose this model.
Re:Microsoft is bringing Python to Excel by brokencode on Tuesday August 22, 2023 @09:33AM (#37222479)
Probably because Excel runs in a web browser nowadays and they want to avoid creating a separate way of running Python locally for a locally installed copy of Excel.

Maybe they will in the future, but it makes sense to start with the approach that will work in both web and local installs.

Re:Microsoft is bringing Python to Excel by tigeroil on Tuesday August 22, 2023 @09:46AM (#37222651)
Looking at what they're doing with Outlook I'd bet money that they intend to replace the desktop version of Excel with the web version sooner or later.
Re:Microsoft is bringing Python to Excel by walthamstow on Tuesday August 22, 2023 @10:26AM (#37223201)
I agree but expect that Excel will be the very last app of the suite that they make web-only. Excel heads like my wife absolutely hate the web version.
Re:Microsoft is bringing Python to Excel by kaashif on Tuesday August 22, 2023 @10:40AM (#37223412)
A lot of people in finance are Excel heads and hate the web version. And they have a lot of money to throw around, surely Microsoft cares about them.

I really don't see them killing the desktop version.

Re:Microsoft is bringing Python to Excel by pessimizer on Tuesday August 22, 2023 @11:47AM (#37224437)
I could see the prices going up to Bloomberg-terminal level, though, and everybody normal having to settle for Excel 365.
Re:Microsoft is bringing Python to Excel by rvba on Tuesday August 22, 2023 @04:10PM (#37227904)
They are killing the deskrop version with sharepoint.

Sharepoint and web-shared files make it very difficult to link spreadsheets between each other, even one way around.

In theory it works, in practice it doesnt. (PowerQuery is an inconvenient stopgap to simple links)

Re:Microsoft is bringing Python to Excel by csdvrx on Tuesday August 22, 2023 @11:10AM (#37223883)
> Excel heads like my wife absolutely hate the web version.

Have her try Excel 2010 or 2007 running on Wine (whether using WSL or natively)

For people who want their spreadsheet offline, it's wonderful: fast and stable.

Re:Microsoft is bringing Python to Excel by pessimizer on Tuesday August 22, 2023 @11:47AM (#37224449)
This is good news. I did not know this.
Re:Microsoft is bringing Python to Excel by HelloMcFly on Tuesday August 22, 2023 @10:32AM (#37223306)
I dread this day greatly, but it's definitely coming.
Re:Microsoft is bringing Python to Excel by Spivak on Tuesday August 22, 2023 @10:30AM (#37223274)
That's got to be the death-knell for Excel. It might be better in every conceivable way but going web-only only makes Sheets look more attractive to the people doing the buying. And you can run JS in your Sheets right now.
Re:Microsoft is bringing Python to Excel by v7n on Tuesday August 22, 2023 @10:29AM (#37223245)
I'm positive they've at least toyed with the idea of running a Python interpreter in a WebAssembly module, which should work in both environments _and_ provide some isolation. The telemetry settings, I guess, wouldn't need to be changed to call home about performance/errors.

I can't attest to the performance of such technique for now, though, or guess why they could have deemed it not worth pursuing at the time being.

Re:Microsoft is bringing Python to Excel by kbelder on Tuesday August 22, 2023 @05:45PM (#37228943)
In my corporate experience, casual usage of excel is in the cloud. Any large, complicated, or db-connected spreadsheet is done on local installations.

The list of what snacks people are bringing to the potluck is in excel online (or google sheets).

The excel sheet that is pulling information from a database, mashing it up, displaying it in a dozen different pivots... that is going to be local.

Re:Microsoft is bringing Python to Excel by kuchenbecker on Tuesday August 22, 2023 @09:37AM (#37222529)
Easier to debug a backend than clients code, single implementation, faster updates, and performance not limited by device.

At the cost of privacy. Consider msft could sell this to you but they chose to let you borrow it instead.

Re:Microsoft is bringing Python to Excel by kspacewalk2 on Tuesday August 22, 2023 @09:39AM (#37222547)
The answer is in the question. They chose this model so that Python calculations would run in the Microsoft cloud, operating on data that resides in the Microsoft cloud. When your code runs on the cloud, they get paid. When your data lives in their cloud, they get paid.
Re:Microsoft is bringing Python to Excel by RcouF1uZ4gsC on Tuesday August 22, 2023 @09:40AM (#37222562)
Because Python, with the required numerical analysis libraries is a pain to setup, and there are a ton of ways for it to get messed up.

Doing everything in the cloud massively simplifies deployment and support.

Re:Microsoft is bringing Python to Excel by pid-1 on Tuesday August 22, 2023 @10:02AM (#37222870)
Microsoft could ship its own Python distro within Excel. The biggest problem is that historically Guido / the Steering Council have avoided being involved in how py libs are distribuited, so there are many ways to do everything. But if you do have an opinion and means to enforce it, mantaining a Python environment can be a quite smooth experience.
Re:Microsoft is bringing Python to Excel by fullstop on Tuesday August 22, 2023 @10:52AM (#37223606)
Doesn't Guido work for Microsoft now?
Re:Microsoft is bringing Python to Excel by pid-1 on Wednesday August 23, 2023 @07:55AM (#37234507)
He does
Re:Microsoft is bringing Python to Excel by WorldMaker on Tuesday August 22, 2023 @12:33PM (#37225130)
A complication here is how large the Python distro this appears to be using is. I don't know if you've ever set up a container with all of anaconda, scikit, statsmodels, pandas, Matplotlib, seaborn, and more but it gets pretty big. A lot of people would complain about the bloat if Excel installed it by default.

Another complication is they claim the container isn't just "a docker container", but for increased security isolation (they don't want a repeat of VBA malware) it's a mini-VM focused to run on top of Hyper-V (the Windows Hypervisor) itself. That's a really complicated install process on the average machine (like installing WSL2) that sometimes involves flipping entire Windows Features on, so also something unlikely to be a smooth experience out of the box for Excel.

It might be neat if they made that an optional install and let users have offline support, but it sounded like they wanted to focus on online and collaborative UX first.

Re:Microsoft is bringing Python to Excel by pseudalopex on Wednesday August 23, 2023 @01:01AM (#37232061)
How large is pretty big? And who said it must be installed by default?

Hyper-V is enabled by default on supported hardware.

Re:Microsoft is bringing Python to Excel by WorldMaker on Wednesday August 23, 2023 @12:14PM (#37238284)
> How large is pretty big?

Python data science containers are on the order of GBs.

> And who said it must be installed by default?

I did end my comment with thoughts that I think it would be nice to have as an optional install. Mentioning why it isn't likely a default install is relevant because they want this Python feature to be accessible to everyone and they want people to collaborate and the UX for an optional install isn't what they were looking for and would complicate things. (That's not an argument against also supporting the optional install, but a reasoning for why the optional install is a harder feature to support and doesn't make the "version 1" cut.)

Re:Microsoft is bringing Python to Excel by pseudalopex on Wednesday August 23, 2023 @02:33PM (#37240296)
> Python data science containers are on the order of GBs.

Yes. And SSDs are on the order of 100s and 1000s of GBs.

> Mentioning why it isn't likely a default install is relevant because they want this Python feature to be accessible to everyone and they want people to collaborate and the UX for an optional install isn't what they were looking for and would complicate things.

How do you know these things?

It won't be accessible to everyone until it's installable. Collaboration is not cloud exclusive. The UX isn't what they were looking for is circular.

Re:Microsoft is bringing Python to Excel by pid-1 on Wednesday August 23, 2023 @07:53AM (#37234488)
Yeah my day job involves deploying Python containers to K8s so I get where you are coming from. GB sized images are not uncommon. However:

1 - That could be an optional component, behind a "Install Python for Excel " button.

2 - You need to install Python to code in Python anyway, with or without Excel.

3 - Bloat is the norm nowadays and I'm not sure whether users care. A clean Visual Studio install takes 10 GB of disk or something. Office itself takes several GB as well.

4 - Not sure why Docker would be needed. Using Python in Windows is fine nowadays. There are caveats with libs that are very reliant on POSIX (Airflow comes to mind,) but, again, if you control your distro you can limit the libs users can install.

Re:Microsoft is bringing Python to Excel by WorldMaker on Wednesday August 23, 2023 @12:24PM (#37238420)
1) I agree, which is I why I did end my comment that I think it would be nice to see an optional install offered for offline usage.

4) I don't think they are using Docker, but they are using containers. (They mention running directly on top of Hyper-V so they might not even be considered by some developers as containers in the Docker sense but closer to "mini" VMs.) The container they are using for security/sandboxing reasons. The Excel team likely still has nightmares from the worst years of VBA macro malware and this Python system seems built specifically to sandbox all the running Python code to an execution environment (container/VM) that is easy to refresh/rebuild/recycle/tear-down. I agree that Python on Windows is usually great and most of the Python ecosystem is great at cross-platform support, but I also understand why Excel would want to sandbox any Python it runs to containers that are isolated from the host machine/user and it can easily reboot.

Re:Microsoft is bringing Python to Excel by Our_Benefactors on Tuesday August 22, 2023 @09:35AM (#37222503)
A lot of people who use excel heavily are not really “programmers” and don’t have strong fundamentals or an appetite to manage their own software stack. This also simplifies development on MS end by only needing to validate a single python version.
Re:Microsoft is bringing Python to Excel by abenga on Tuesday August 22, 2023 @09:49AM (#37222688)
Then they should embed the supported version of python in Excel and manage it automatically for them. This can be validated with Excel before release.
Re:Microsoft is bringing Python to Excel by 0cf8612b2e1e on Tuesday August 22, 2023 @10:00AM (#37222846)
This seems like the only solution. Do not copy all of Python’s warts, but offer a curated experience. Microsoft Experience (TM) with fixed APIs, no package management or dealing with ecosystem churn.
Re:Microsoft is bringing Python to Excel by Spivak on Tuesday August 22, 2023 @10:33AM (#37223328)
It will never work because Python is the ecosystem. Having Python without the ability to tap the huge catalogue of existing software makes the integration worthless. The first thing someone will want to do is use Pandas on a live spreadsheet.
Re:Microsoft is bringing Python to Excel by kortex on Tuesday August 22, 2023 @12:44PM (#37225280)
If you read TFA, you'd see that the python env comes with a bunch of the favorites (pandas, matplotlib) baked in.
Re:Microsoft is bringing Python to Excel by 0cf8612b2e1e on Tuesday August 22, 2023 @02:56PM (#37227065)
The use case is someone in Excel who does not want to write VBA. You do not need to offer the entire ecosystem, just a slightly better language to handle more sophisticated modeling needs.
Re:Microsoft is bringing Python to Excel by twen_ty on Tuesday August 22, 2023 @09:33AM (#37222481)
Re:Microsoft is bringing Python to Excel by ltdanimal on Tuesday August 22, 2023 @09:55AM (#37222760)
Looking at all the packages available, I'm sure that's why. You make it a much simpler thing to just develop that runtime for a known environment that you control vs a browser/local that requires a lot more engineering effort to make sure it works correctly for everyone.
Re:Microsoft is bringing Python to Excel by JBorrow on Tuesday August 22, 2023 @09:56AM (#37222781)
You could ship that known environment as an optional download.
Re:Microsoft is bringing Python to Excel by inglor on Tuesday August 22, 2023 @09:55AM (#37222775)
My guess is that it makes it easier to work on large files which is common without downloading the whole file and it makes CoPilot related efforts much easier.

I work on Excel but not this feature and am happy to ask around if people are interested.

Re:Microsoft is bringing Python to Excel by felixgallo on Tuesday August 22, 2023 @09:58AM (#37222821)
The last thing in the universe I'm interested when editing Excel is making CoPilot related efforts any easier.
Re:Microsoft is bringing Python to Excel by ec109685 on Tuesday August 22, 2023 @10:22AM (#37223128)
Sandboxing python enough that millions of users could safely pass around excel workbooks is a super hard problem, especially when you allow third party libraries.

Forcing it to run in an isolated environment they control simplifies the problem greatly.

Re:Microsoft is bringing Python to Excel by jasonjayr on Tuesday August 22, 2023 @10:49AM (#37223553)
Windows has it's own implementation of containers, and with a docker-like structure, and xlsx being a zip file, excel could simply have a dockerfile like structure "FROM excel-python:2023" "COPY xlsx:scripts/" etc. new versions of excel could keep the last few 'base' containers, or if they are in love with the cloud, the signed, verified base images could be pulled on request.
Re:Microsoft is bringing Python to Excel by ec109685 on Wednesday August 23, 2023 @02:56PM (#37240577)
The latest Windows does, but Excel is used across tons and tons of devices, and you'd want compatibility across them all.
Re:Microsoft is bringing Python to Excel by nixass on Tuesday August 22, 2023 @11:15AM (#37223942)
As soons as nonsense like this comes about you can tell straight away that it's not in user's favor. It's probably to tie you into subscription, data mining, selling mined data to ad companies and squeez every single dollar they can out of you
Re:Microsoft is bringing Python to Excel by r00fus on Tuesday August 22, 2023 @02:26PM (#37226717)
Who's the CEO of Microsoft again? Satya would love this approach.