Python in Excel – Available Now (techcommunity.microsoft.com)
from neme@lemm.ee to python@programming.dev on 16 Sep 18:00
https://lemm.ee/post/42453668

#python

threaded - newest

sugar_in_your_tea@sh.itjust.works on 16 Sep 18:08 next collapse

LibreOffice has had this for quite some time. It’s nice to see Microsoft finally catching up. :)

rhymepurple@lemmy.ml on 16 Sep 19:07 next collapse

Over a year later and I still do not understand what the use case for this is.

A lot of the examples/documentation that was made by Microsoft for this seems to focus on data analysis and data visualization. Anyone in those fields would probably prefer to get the data out of Excel and into their tool/pipeline of choice instead of running their Python code in Excel. That also makes the big assumption that the data being used is fully contained within the Excel file and that the libraries used within the code are avalaible in Excel (including the library version).

For anyone looking to learn/use Excel better, I doubt the best use of their time is learning a new programming language and how Excel implements that programming language. They would likely be better off learning Excel’s formulas, pivot tables, charts, etc. They could even learn Power Query to take things to another level.

For anyone looking to learn Python, this is absolutely a terrible way to do so. For example, it abstracts away library maintenance, could provide modified error messages, and makes the developer feedback loop more complicated.

If you want to automate Excel then this realistically allows for very little new functionality that did not exist prior to this feature. Using other Python libraries like OpenPyxl and xlWings will still be required to automate Excel.

I am sure there are edge cases where this iteration of Python in Excel is perfect. However, this feels like a checkbox filler (“yeah, Excel supports Python now”) than an implementation of an actual useful feature. A fully featured and supported Python library that manipulates Excel/Excel files would have been a much more exciting and useful feature - even if it had to be executed outside of Excel, like OpenPyxl.

RamblingPanda@lemmynsfw.com on 16 Sep 20:02 next collapse

Most of the time I just push the data into a database and then do whatever I want. I get why people use Excel, but once you reach its limits it’s a huge headache to migrate.

jacksilver@lemmy.world on 16 Sep 20:58 next collapse

My biggest issue with it is that it runs everything in the cloud. So you’re shipping your data to Microsoft and have latency to run anything. Seems insecure and added complexity to get a bit more out of excel.

rhymepurple@lemmy.ml on 16 Sep 21:41 next collapse

I agree with everything you said, but (in Microsoft’s eyes) this is a feature - not a bug.

Without this cloud component, how could:

  • Microsoft make sure that the accounting team does not introduce a malicious/old Python library into the Excel file?
  • Microsoft protect its users from writing/running inefficient, buggy, or malicious Python code?
  • Microsoft provide a Python runtime to users who do not know how to install Python?
  • Microsoft charge to run code that you wrote in a free, open source software programming language on a device that you own?
morbidcactus@lemmy.ca on 16 Sep 23:43 collapse

Oh seriously? When there were rumblings of it coming years ago, I just assumed it would be implemented as a VBA successor, have everything local but just baked into excel. I guess I shouldn’t be that surprised though…

jacksilver@lemmy.world on 17 Sep 00:53 collapse

Yeah I was really disappointed when I heard it was a cloud solution. I think it’s due to complexity of python runtime environments, but I doubt msoft minds the opportunity to take more control.

SandbagTiara2816@lemmy.dbzer0.com on 17 Sep 03:17 next collapse

I do a lot of data analysis and visualization in my job, and you are correct. I use Excel when I need to share data with co-workers, but I prefer to use Python for just about everything else. I see no reason to embed Python in Excel.

GetOffMyLan@programming.dev on 18 Sep 06:38 next collapse

Likely aimed at financial departments which often (in my experience) love to do everything in Excel.

olympicyes@lemmy.world on 18 Sep 15:24 next collapse

Sometimes when IT only lets you hold a hammer, then by necessity everything looks like a nail.

starshipwinepineapple@programming.dev on 18 Sep 18:12 collapse

Right. VBA or this may not be the best tools for the job but when IT restricts what can be used then VBA or excel python could be great examples of Shadow IT.

rhymepurple@lemmy.ml on 18 Sep 16:41 collapse

That’s true, but how often have you heard a finance team member wanting a CSV file so they can more easily process the data using Pandas or visualize it with MatPlotLib? How many accountants or finance people (especially those that ask for everything in Excel) do you know that is comfortable writing even a single line of Python code? How many of the finance team’s Excel-based tools will Python integrate well with? What feature(s) does Python within Excel provide that Excel (formulas, pivot tables, VBA, Power Query, Power Pivot, etc.) does not provide that someone on the finance team would need? What advanced charting/dashboarding functionality does Python in Excel provide that isn’t better accomplished in PowerBI (if not handled by standard Excel charts/graphs)?

Don’t get me wrong - Microsoft’s implementation of Python in Excel has its merits and will solve some problems that otherwise would not be possible in Excel and will make some people happy. However, this is not the solution most people were expecting, asking for, or find useful.

refalo@programming.dev on 18 Sep 15:47 collapse

ebassi moment

badbytes@lemmy.world on 17 Sep 01:17 next collapse

Excel, what an oxymoronic name.

kSPvhmTOlwvMd7Y7E@programming.dev on 17 Sep 06:23 next collapse

Absolutely not a replacement to VBA. Not even close. As usual, Microsoft hypes something everyone wants, and then implements something nobody asked

dbx12@programming.dev on 18 Sep 13:28 next collapse

So we can write Macro viruses in two languages now?

aluminium@lemmy.world on 18 Sep 16:00 next collapse

The fact that you can use Python before .NET kinda amazes me

sebsch@discuss.tchncs.de on 18 Sep 22:10 collapse

Does it run locally or at some computing cloud?