Microsoft Announces Python In Excel 92
theodp writes: On Tuesday, Microsoft announced the Public Preview of Python in Excel, which "runs securely on the Microsoft Cloud".
From the Home Office in Redmond: "Python is one of the most popular programming languages today, loved by businesses and students alike and Excel is an essential tool to organize, manipulate and analyze all kinds of data. But, until now, there hasn't been an easy way to make those two worlds work together. Today, we are excited to introduce the Public Preview of Python in Excel -- making it possible to integrate Python and Excel analytics within the same Excel grid for uninterrupted workflow. Python in Excel combines Python's powerful data analysis and visualization libraries with Excel's features you know and love. You can manipulate and explore data in Excel using Python plots and libraries, and then use Excel's formulas, charts and PivotTables to further refine your insights...We're partnering with Anaconda, a leading enterprise grade Python repository used by tens of millions of data practitioners worldwide. Python in Excel leverages Anaconda Distribution for Python running in Azure, which includes the most popular Python libraries such as pandas for data manipulation, statsmodels for advanced statistical modeling, and Matplotlib and seaborn for data visualization....While in Preview, Python in Excel will be included with your Microsoft 365 subscription. After the Preview, some functionality will be restricted without a paid license."
Python creator Guido van Rossum, now a Microsoft Distinguished Engineer, helped define the architecture for Python in Excel and had this to say: "I'm excited that this excellent, tight integration of Python and Excel is now seeing the light of day. I expect that both communities will find interesting new uses in this collaboration, amplifying each partner's abilities. When I joined Microsoft three years ago, I would not have dreamed this would be possible. The Excel team excels!"
From the Home Office in Redmond: "Python is one of the most popular programming languages today, loved by businesses and students alike and Excel is an essential tool to organize, manipulate and analyze all kinds of data. But, until now, there hasn't been an easy way to make those two worlds work together. Today, we are excited to introduce the Public Preview of Python in Excel -- making it possible to integrate Python and Excel analytics within the same Excel grid for uninterrupted workflow. Python in Excel combines Python's powerful data analysis and visualization libraries with Excel's features you know and love. You can manipulate and explore data in Excel using Python plots and libraries, and then use Excel's formulas, charts and PivotTables to further refine your insights...We're partnering with Anaconda, a leading enterprise grade Python repository used by tens of millions of data practitioners worldwide. Python in Excel leverages Anaconda Distribution for Python running in Azure, which includes the most popular Python libraries such as pandas for data manipulation, statsmodels for advanced statistical modeling, and Matplotlib and seaborn for data visualization....While in Preview, Python in Excel will be included with your Microsoft 365 subscription. After the Preview, some functionality will be restricted without a paid license."
Python creator Guido van Rossum, now a Microsoft Distinguished Engineer, helped define the architecture for Python in Excel and had this to say: "I'm excited that this excellent, tight integration of Python and Excel is now seeing the light of day. I expect that both communities will find interesting new uses in this collaboration, amplifying each partner's abilities. When I joined Microsoft three years ago, I would not have dreamed this would be possible. The Excel team excels!"
Re: (Score:2)
This won't end badly at all... (Score:2, Offtopic)
Re:This won't end badly at all... (Score:4, Funny)
Re:This won't end badly at all... (Score:5, Funny)
That's not doom music, it's crazy music!
To be specific... it's Yakety Sax.
Re: (Score:2)
Re: (Score:2)
Argh, posting to revert an accidental mod. Heheh, "in the cloud, baby, yeah!"
Re: (Score:2)
Alternate title (Score:5, Informative)
Re: (Score:2, Insightful)
That's pretty much Microsoft's MO:
OSes
Internet
VOIP
Cloud
Re: (Score:2)
Re: (Score:2)
This is potentially a big deal because until now there has been no widely adopted open standard for programming in spreadsheets. LibreOffice uses Python, Google Sheets uses Javascript, and Excel uses VB Script. Software written for one is not portable to the others.
Re: Alternate title (Score:1)
If only LibreOffice catches up to Excel in almost everything else I need.
Re: (Score:2)
I sincerely hope you're not doing something actually important, like scientific data processing, or COVID tracking.
Hurl (Score:5, Funny)
Re: Hurl (Score:3)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Quote: With Python in Excel, you can type Python directly into a cell, the Python calculations run in the Microsoft Cloud, and your results are returned to the worksheet, including plots and visualizations. Hooray! Thatâ(TM)s exactly what I wanted. For all my calculations to be ran on someone elseâ(TM)s computer! So they didnâ(TM)t add Python to Excel, they just enhanced the web client that handles WEBSERVICE (https://support.microsoft.com/en-us/office/webservice-function-0546a35a-ecc6-4739-aed7-c0b7ce1562c4) to automatically wrap Python and send it off. Gotcha!
Microsoft's response would likely be a query as to why any plebe would want to use Excel on their own computer when the cloud version sorta/kinda works some of the time to do the same things, plus EVERY keystroke can be tapped for juicy data streams... er, um, I'm sure they would mean to say that they can keep it all forever backed up for you on their fair to middlin' attempto to mimic what unix network filesystems have done since the dawn of the computer age, and somehow still managed to fail to imitate.
Re: (Score:2)
Wait what is an "own computer"? Are you saying you're computer is not just a remote desktop interface into a cloud hosted Windows 365 instance?
Re: (Score:2)
Actually one of the coolest things I ever saw was a spreadsheet based on Python where python was the expression language for formulas in cells. Was pretty neat, especially when you pull in the power of all the common libraries, as well as Python types.
will you be billed for XX run time? (Score:2)
will you be billed for XX run time?
Re: (Score:2)
You will be billed XX * YY, yes.
Re: will you be billed for XX run time? (Score:2)
Re: (Score:2)
Yes.
Then they'll update the runtime and break all your code.
That's funny (Score:3, Interesting)
The ironic thing about this story for me is that almost everything that I would have done in a spreadsheet a few decades ago, I now do by writing a quick standalone Python script.
I keep the input data separate from the logic, often in CSV, JSON or something similar. The logic also isn't hidden and spread out under countless cells, doing magic references to informative names like $G6, or needlessly duplicated in arrays of the same expression. All of this also works better with version control than saving a binary spreadsheet file.
Sometimes I do load the output into a spreadsheet if I need to do a quick graphical plot of the results, but that's mainly because I'm too lazy to learn a real plotting application.
Re:That's funny (Score:5, Insightful)
Re: (Score:2)
The work Guido did in making comprehensions so powerful maps them almost completely to SQL, so I have always though there is a natural fusion between python and database data. This is especially true with generators, which are lazy iterators utilizing yield statements to stream data on reading. I think it is possible to make a symbolic calculus of these classes, which correspond to SQL statements, and can be optimized for performance after completed, as they are only read on iteration. So with some really m
Re: (Score:2)
I usually do my my calculations in Excel, it's more visual as I can see the answers, all at once, and thus see what I need to calculate next (Obviously not suitable for large-iteration loops). Also, like maths, a cell can't modify itself.
Good and bad (Score:2)
Python is good, the cloud is bad, very bad
It's a trap, run away!
The cloud is NOT your friend
Re:Good and bad (Score:4, Funny)
Burma Shave
Re: (Score:2)
Except for the most trivial of Python applications, each one carries a boatload of dependencies riding upon a rainbow of Python releases and packages. For a specific application to run, Python must be at a specific dot release, and the packages it depends on must be within a narrow band of releases, sometimes just one specific release will do. As a result, I've lost count of how many pyenv instances with Python virtual environments inside them I've had to spin up over the years.
Maybe Excel deals with this b
Re: (Score:2)
Maybe Excel deals with this by giving you just one Python release to use with Excel along with a curated set of packages with stable interfaces. Maybe you get just one release of Python with no packages. Or then again, maybe you get the whole jungle to explore! I'm not going to try it to find out, so I'll leave that as a mystery whose murky depths the reader may plumb as they wish.
Another danger is the "running in the cloud" bit. Well, that's nice just so long as you've got working internet connection. Sometimes, even the most well connected of us don't. Guess that's just too bad.
Extrapolating from the announcements, and knowing Anaconda is involved, they are locking a given tool set (package versions) that are known to work well together, much like Jupyter works. This guarantees that, for the versions available, everything will work well together. It may also hinder the ability to add new or updated packages (e.g. SARIMAX if it's not available in the standard distribution). The user may have little to no control over adding packages and importing them to Excel/Python code.
As for
Re: (Score:3)
As for running in the cloud -- this is a very elegant solution to very large data problems.
Elegant isn't the word I'd choose. I'd tend more towards one that simultaneously expresses both vendor lock in and satisfaction of an urge to rent seek. Enshitification does nicely
Re: (Score:2)
Python is bad too.
So it's just bad.
Uh oh (Score:3, Funny)
There's a snake in my boot!
Re: (Score:2)
Who's the lo-down galoot varmint that modded this down?
Re: (Score:2)
To display the information to PHB types.
Re: (Score:3)
Great! (Score:2)
First thought that came to mind ... (Score:1)
Pure comedy gold!!!!! (Score:5, Funny)
Stop it, you're killing me.
The New Zawinski's Law? (Score:3)
Is this the latest evolution of Zawinski's Law? (Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.) It seems like everything is slowly incorporating python one way or another.
Re: (Score:2)
A common programming language that is actually useful and everyone knows is a bad thing? Micro$oft (principally but not exclusively among other corporate entities) have insisted on proprietary languages to create moats of limited usefulness.
Re: The New Zawinski's Law? (Score:2)
The determined Real Programmer can write FORTRAN programs in any language.
New data mining (Score:4, Interesting)
With potentially large quantities of data being send to the cloud for processing, this does seem like a gold mine for data mining (or exploits).
Re: (Score:2)
With potentially large quantities of data being send to the cloud for processing, this does seem like a gold mine for data mining (or exploits).
Possibly even an interesting way to DDoS the MS cloud.
Re: (Score:2)
Ever hear of a National Security Letter?
Re: (Score:2)
Ever hear of a National Security Letter?
No, but the picture of a bird I've attached to this comment will disappear if I ever get one.
Re: (Score:2)
Ever hear of a National Security Letter?
No, but the picture of a bird I've attached to this comment will disappear if I ever get one.
It just turned into an X. Should I call Elon?
Re: (Score:2)
Ever hear of a National Security Letter?
No, but the picture of a bird I've attached to this comment will disappear if I ever get one.
It just turned into an X. Should I call Elon?
Only if it's a 10,000,000 lumen flashbulb shining directly into your apartment window.
Re: (Score:3)
The overwhelming majority of Excel data is completely meaningless without the necessary context to understand what the heck numbers means and what we are attempting to do with them. Excel spreadsheets are not lengthy word documents describing themselves, quite the opposite, they are completely useless without a deep existing understanding of the content.
The entire freakout of datamining reminds me of the current state of data in the world. Google knows everything about you. Facebook knows everything about y
Hooray! (Score:5, Funny)
Now Excel can do for Python what it did for Basic!
Re: (Score:2)
Visual Python?
"runs securely on the Microsoft Cloud" (Score:2)
It is to laugh
Would have been interesting 15 years ago (Score:3)
At the time I was using PyXLL (https://www.pyxll.com/) to execute Python code as it was so much better than VBA.
I believe Ballmer was CEO at that time and he did not pay any attention to Open Source, hence no Python in Excel.
Maybe the market share of Excel is slipping or Nadella is looking to monetize yet another Open Source project after successfully monetizing Linux by running Azure on it.
Re: Would have been interesting 15 years ago (Score:2)
Re: (Score:3)
Print(2/3) (Score:2)
Using Python to print 2/3 in Microsoft Excel, clearly the mark of the beast.
So you send the spreadsheet and it breaks? (Score:3, Insightful)
So you send the spreadsheet to someone else and it breaks?
While in Preview, Python in Excel will be included with your Microsoft 365 subscription. After the Preview, some functionality will be restricted without a paid license."
First, as described it's not "Python in Excel", it's "Cloudy Python called from Excel".
So, you email the spreadsheet, maybe to another department or company, but the recipient doesn't have the right license or their firewall doesn't allow random spreadsheets to directly access the internet, and it's broken. Obviously broken (informative error message), less obviously (obscure error message) or subtly broken (wrong results)?
Re: (Score:3)
But what can you do? Mere laptops can't possibly run something as complicated as a python command. You absolutely need a few racks of equipment ready to run your dinky little python expression.
Python in a spreadsheet is not new to me (Score:3)
Many years ago, I wrote a fairly short program that worked like a basic spreadsheet, but in the cells you put a python code that returned the cell's contents.
This let you do complex operations based on the values of other cells and it could change other cells so it was like a Turing machine with self modifying code and a 2D tape. It was not at all polished, but as a proof of concept it worked very well, albeit very slowly and in a memory hogging sort of way.
I should have put it up on github, but I lost it when I left my employer and forgot to save a copy.
It wouldn't take long to recreate.
Re: (Score:3)
Re: (Score:2)
Also here https://pyspread.gitlab.io/ [gitlab.io].
Nice. Mine was text mode only.
Given the size of an MS Office install nowadays (Score:3)
Rather than requiring the cloud, I'd have thought they could've squeezed a local python install in there without anyone noticing the relatively tiny increase in footprint.
Re: (Score:2)
Rather than requiring the cloud, I'd have thought they could've squeezed a local python install in there without anyone noticing the relatively tiny increase in footprint.
I suspect it's part of a longer term play for Access Db integration.
For the amounts of data you deal with on spreadsheets the vast majority of desktops have enough power. But if you start working with a database now you may want some cloud power, particularly if the DB is already on the cloud.
I think the goal here is to start training the user base and ironing out the workflow for a pure cloud experience where processing is fired off to the cloud (for lots of $$).
other way (Score:3)
The excel modules I've used so far have had some issues (I may be lagging the latest versions) but they seem to be based on reverse engineering excel to some degree - if microsoft were to release an excel module it would presumably be an improvement.
I'm sure it's not possible but..... (Score:1)
I would just grid up a bunch of 0 length arrays. Yep, cell upon cell of just 0 length arrays....
Why not Excel PowerShell? (Score:1)
Its already cross platform, .net, easy to use...what the heck.
Re: (Score:2)
It lost the popularity contest.
*Particularly* in any numerical analysis field, no one is even vaguely thinking of or enabling PowerShell.
About the only powershell I see in the wild is for Windows systems administration (yes, they have a linux version, and I did install it... to help guide a windows user that insisted on powershell). A Powershell user may avail themselves of decent parsing and http interaction, but again mostly toward the end of managing IT resources.
Also, cross platform doesn't even matter
There's no possible way (Score:2)
Protected Mode (Score:2)
This will be disabled by default and hidden under Protected Mode, right? Otherwise this is a hacking wet dream.
Active Attachements (Score:2)
We need Outlook (365) to know about Excel spreadsheets that are attachments to emails. Even if they aren't in your inbox. It should "run" each spreadsheet (calling any registered Python callbacks in the spreadsheet) every couple of hours. This would be useful for all those people who believe using spreadsheets for bug tracking or project management is a good idea. Especially when people each have their own copy and like to say "Well, in MY email I'm using version xyz." Imagine the fun of being able to
Pip (Score:2)
Excel can do python that could do pandas (Score:2)
EEE (Score:2)
Embrace, Extend, Extinguish.
How long before Microsoft adds some "python" features that work only on their software ?
What "secure" MS cloud? (Score:3)
That one where the had a master-key with massive privileges stolen recently? And did not notice? And the key was expired and still worked anyways? And it was a key for private users and allowed access to corporate users and, it seems, _all_ of them? That key that anybody halfway competent would have put in a HSM, but that apparently was just used in ordinary VMs? That cloud?
The only question is whether they are now utterly deranged at MS or think their customers are completely stupid. Well, maybe both.
What could possibly go wrong? (Score:2)
When Python 4 is suddenly the default(recommended) non-option that alters the interpretation of whitespace indentation in new and unpredictable ways.
Excel's features (Score:2)
Excel's features you know and love
Like for instance its appetite to ruin your data [theverge.com].
"Python in Excel runs on the Microsoft Cloud" (Score:3)
Does this mean the Python isn't actually /in/ Excel, but instead all your code & data is getting pushed to some cloud service where the Python is executed and then the results returns?
I mean this sounds cool at a high level but, uh, less cool if it's not running locally on my actual machine.
LOL wait (Score:2)
"Microsoft Announces Python In Excel"
Lol, is it April 1st again already?? Ha ha you guys come up with the craziest stuff!!
So it won't work without an internet connection (Score:2)
So if you're on a plane and don't want to pay for wifi, or in a high security environment that won't let your computer get to the internet, or at a remote location. Yes, there still are places where you don't have wifi everywhere.
Re: (Score:2)
If you're on an airplane, you can just fly through the cloud and reach out the window to get a connection to Microsoft.
VisualBasic - we hardly knew ye (Score:1)