Microsoft is bringing popular programming language Python to Excel. A public preview of the feature is available today, allowing Excel users to manipulate and analyze data from Python.
You won’t need to install any additional software or set up an add-on to access the functionality, as Python integration in Excel will be part of Excel’s built-in connectors and Power Query. Microsoft is also adding a new PY function that allows Python data to be exposed within the grid of an Excel spreadsheet. Through a partnership with Anaconda, an enterprise Python repository, popular Python libraries like pandas, statsmodels, and Matplotlib will be available in Excel.
Running in the cloud is another reason to keep paying them every month in perpetuity, rather than just once. Helps keep revenues stable and indefinite.
I had mostly the same reaction. The back of the box reads okay, but the potential is worrying. Even as a "cybersecurity news rubbernecker" (Seriously Risky Biz podcasts)
It seems that this Python integration expects that the source data already exists within the Excel file and Python can essentially just be used to create either visuals or new tables within the same Excel file.
If that's accurate, then this is intended exclusively for data analysis and not process automation. I don't think this will allow people to enhance their existing Python based ETL jobs or create new ones because of this new integration. This does not seem to be a replacement/substitute for VBA or OfficeScripts. It also does not seem to be an alternative to Power Query. If anything, this seems to be most similar to Power Pivot.
After preview it will be a paid subscription additional to Office365, the same strategy as Office Copilot. I hate this policy of pay for a product then still paid for more functionalities... at the end of the year you will have paid a lot.
Microsoft says Python in Excel will be included in a Microsoft 365 subscription during the preview, but “some functionality will be restricted without a paid license” after the preview ends.
Yeah this is typical Microsoft looking at ways to force people up the price ladder.
They did it with Power Platform in very obvious ways. They have completely gutted things like Power Apps and Power Automate by making almost all functions non-delegable... unless you are a paying a premium on top of a premium for costly dataverses in which case more than like 7 functions are magically delegable again. But then there are the pay-per-user/pay-per-use connections to access your own data, even if you host it yourself as an enterprise.
💰💰💰
By sending every calculation to Microsoft servers they can log what your company is doing and sell that data to ad-agencies. Also it forces you into a subscription.
I'm not a fan of it either, but I'm not sure how else this could work seamlessly. How would you ensure that everyone you share your Excel file that utilizes Python has the expected Python setup on their machine? What if they have an older version of a library you used that breaks your script? What if they don't have Python installed at all?
While this will only work on Windows desktop at first, Microsoft plans to roll this out to "other platforms" over time. Is there any other way for this integration to work for Excel for web, iPad, and/or Teams?
A public preview of the feature is available today, allowing Excel users to manipulate and analyze data from Python.
“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,” explains Stefan Kinnestrand, general manager of modern work at Microsoft.
Microsoft is also adding a new PY function that allows Python data to be exposed within the grid of an Excel spreadsheet.
Python calculations run in Microsoft’s Cloud, with the results returned into an Excel worksheet.
Excel users will be able to create formulas, PivotTables, and charts all based on Python data, with the ability to bring in charting libraries like Matplotlib and Seaborn for visualizations like heatmaps, violin plots, and swarm plots.
Python in Excel is rolling out today as a public preview for Microsoft 365 Insiders in the Beta Channel.
The original article contains 342 words, the summary contains 147 words. Saved 57%. I'm a bot and I'm open source!
As someone who is learning python, this is exactly what I was learning to code for. Are there any known resources or courses that specifically teach about python for excel or what you should learn t for this application? Libraries & dictionaries seem like a good start?
Having it run locally would be even more help for my use cases. I often have lists of IP addresses in my sheets, and it would be helpful to ping them directly from Python code. But I can work around that with fping or nmap.
This integration won't allow you to do that. Python will not run locally, but instead on Microsoft's platform (likely Azure).
If you're just reading some simple data from Excel, there are several ways of accomplishing this already. For example, Pandas has read_excel() and there is also openpyxl. You could even use those tools to write the results back to Excel. Things get more complicated though if the Excel file is something more than just a simple list.
And honestly, for data you should be using formats like .csv anyways. i really don't see who this update is supposed to target. If you're using Python, the data must be large enough to warrant its use.
But why? Excel is a shit way to work with big amounts of data due to it's own format's complexity and bloated software. It's welcome to implement python, but that's not what holds it down. Opening a big csv would crash it on the same machine that loads it with a python IDE in seconds. It's not made for this. It's like, nice, but the volume of information you need to make it matter would break Excel in halves.
This feels like a really dated take to me. Leaving aside whether this was true in the past, in 2023, Excel is happy to open absolutely gargantuan files, and it's quite speedy once it's done so. You can even directly tie it to a database via ODBC if you want, and that works (albeit it obviously flattens the data out in the process, so goodbye foreign keys in any real sense). It also has tons of very easy-to-use data manipulation tools (pivot tables, tables in general, data extrapolation, graphs, etc.) that end up being wonderful complements to something like Python.
Could you write a Python program that would run faster than pure Excel and do the same thing? I mean, probably (although Excel's core execution engine is honestly pretty freaking fast). But could you write it as quickly? Maybe, maybe not. And certainly someone who knows Excel well would have an easier time adding a little Python to patch up any issues than rewriting the whole thing from scratch.
tl;dr I think you're not being accurate about contemporary Excel, and I separately suspect you're not really the target audience here
I agree with all your points about Excel being capable. However, I'm struggling to think of examples where this newly announced Python integration within Excel would be helpful (with the exception of new/different visualizations) - especially for the reasons you stated about modern Excel.
Are there any use cases that you can think of where someone who knows Excel well would resort to "adding a little Python to patch up any issues"?
I don't know how new Excel performes and I thought it's the same as ten years ago - the version I'm trapped in. With people who obsessively try to drive it to the edge where it's not responsive on average office PCs.
But if it works well with various big spreadsheets now, it's a wonder, with how many new people start to tackle programming with Python. I obiviosly won't write a script faster than normal operational speeds of software, it's just some tables ended up that big and broken I could only open them like that. But that, I guess, is exclusion?
It's just the issue of people using a microscope as a hammer when they need to break nuts.
I agree! I'm not sure why you're being downvoted either.
This new integration just allows you to do data analysis and data visualization of existing data within an Excel file via Python. The output of your Python scripts is limited to the Excel file. The Python environment itself is also limited as it runs on Microsoft's platform and is controlled by Microsoft.
The (Excel) problem that people already using Python for data analysis/visualization is that they have to use Excel files. Reading/writing Excel files via Python can sometimes be tedious or limiting. Utilizing Python inside of Excel via this integration may help in some scenarios, but they won't be able to use custom libraries built internally, control the Python environment (eg - must use specific version of Python or Python library, can't utilize all Python libraries available on pip, etc.), connect to all necessary external data sources via Python, and utilize proper VCS tools like git.
The problem that people automating tasks via Python have is that there is no Python library nearly as capable of reading or manipulating Excel files as VBA is. This new Python integration does not change that.
The problem that Excel users have is that they want more advanced (or simple/easier) data analysis and data visualization capabilities. However, with Excel's dynamic array formulas, LAMBDA formula, Power Query, and Power Pivot, Excel is becoming much more capable than it ever was. If those tools cannot meet your needs, you likely need to move to something like R, Python, or some other tool. Embedding Python into Excel like this integration does still limits Python with all of Excel's current restraints (size, performance, etc.).
I'd like to see it. VBA is actually brilliant, you can make very very portable applications with intuitive user input and output interfaces (i.e. a cell range in Excel, and and version of tables and graphs you like as outputs)... But realistically who wants to use BASIC these days?
I usually say it in jest, but I'm not sure there is actually a better RAD (rapid application development) platform out there than Excel (with a bit of VBA as needed).