I have seen some tomfuckery in my time, but this one is absolutely baffling.

#Excel

@Rhodium103 it's so they can charge extra for it

i set the registry entry to get the thing to load and the http request promptly returned 403 you need a license

@Rairii @Rhodium103 ...this makes me want to see someone implement Python in VBA

(or you could implement it as an add-in and that would be far better, but VBA is more cursed and hilarious)
@bhtooefr And I thought that time someone wrote a php interpreter in php was Peak Silly.
@Rhodium103 @bhtooefr I guess the idea of a self-hosting language is fairly well-established, but still kind of amazing every time 🙂

@airadam @Rhodium103 @bhtooefr

Self hosted popular fast compiled language for sure, but php and vba? That's cursed as hell

@bhtooefr @Rairii @Rhodium103 didn't FogBugz make a compiler that compiled VBA to literally everything? There's a precedent
@bhtooefr @Rairii @Rhodium103 CodeLLaMa got you bro...
CreateObject("Wscript.Shell").Run "python.exe", 0, False
@Rhodium103 Soon the unholy fusion of python, pandas, and Jupiter notebooks will be complete and automation will be impossible. Feel the hate flow thru you.
@madopal @Rhodium103 can the excel cell with pythons in it use 🐼s to read the excel file itself? ☁️
@madopal
@Rhodium103 Oh God, the thought of this made me throw up in my mouth a little bit
@Rhodium103 I'm 100% certain this will be disabled where I work. The data security classification I work in prevents this and for good reason.
@ericsedge @Rhodium103 same here. What a baffling blurring of the line between your data on your computer and stuff azure weirdos get to look at. Excel is used for extremely sensitive data, and they want to make a formula capable of auto-exfiltration?

@depereo @ericsedge @Rhodium103 I work with classified government documents, up to Protected C.

The government's definition of "Protected C" is "information or assets that, if compromised, could cause extremely grave injury to an individual, organization or government."

We store all our documents on a mix of Azure and SharePoint (which is basically OneDrive but for business and worse).

Don't underestimate what businesses will still consider "secure" :P

@ericsedge @Rhodium103 any acceptable level of IQ (that is above zero) should prevent this...
@Rhodium103 [insert python reverse shell]
@Rhodium103 how else are they supposed to feed the AI that generates Python code?
@MaybeMyMonkeys @Rhodium103 This is satire but Microsoft actually does this lol, they have a Python module that uses ChatGPT to implement functions on the fly :)
@Rhodium103 Wow, two untrustworthy computational systems united on Someone Else's Computer. Have fun auditing that for correctness...
@Rhodium103 I'll admit that looks weird, however the reason for running the Python in the cloud is so that a Python payload can't maliciously access resources on your computer, install malware, or otherwise pose a security risk to your assets. Like most security issues, it is a trade-off.

@VisualStuart @Rhodium103 Did anyone explain the need for Python in Excel to begin with?

I'm still waiting to see the reasoning behind it

@hu_logic @Rhodium103 Architect John Lam explains some of the reasoning for this feature in his LinkedIn post, and the linked article.
https://www.linkedin.com/feed/update/urn:li:activity:7099776889065537536
John Lam posted about Python in Excel is now a thing! A project of a lifetime. | LinkedIn

Python in Excel is now a thing! 1,464 days ago, I met Keyur Patel and Shaofeng Zhu in a conference room in Building 17. They showed me a Hackathon project that… | 14 comments on LinkedIn

@hu_logic @VisualStuart @Rhodium103

Excel is the most popular spreadsheet and data visualization software by corporations and normies by a margin so enormous even SQL variants or stuff by IBM don't compare.

There's stuff it's not great at on its own. Power BI, Power Analytics, Data Tools, and related packages give some extra power but usually at a relatively high learning cost that isn't transferable. Python offers a way to do a lot of stuff more easily and can leverage skills people might have learned without an expensive Microsoft Certified training course.

Sure, it'd be great if Orange3, PySpread, or Mito were ready for primetime in a corporate environment but they're just not. Adding the power of the most popular programming language for data science to the most popular data thing makes sense.
@VisualStuart @Rhodium103 It looks weird because a sandboxed Python interpreter would meet those requirements without needing an Internet connection to display a cell in a spreadsheet.
@VisualStuart
@Rhodium103 Is it possible to choose the cloud provider in this case? Or not? And is it possible to self-host the python cloud provider?
@Genstar @Rhodium103 It seems like you are looking for xlwings instead.
https://www.xlwings.org/

xlwings is an open source package that allows you to automate Excel with Python on Windows and macOS. Write Excel macros and UDFs in Python.

Automate Excel with Python (Open Source and Free)
@VisualStuart @Rhodium103 Same could have been achieved with a properly sandboxed python interpreter that runs locally...
@jr @Rhodium103 It seems like you are looking for xlwings.
https://www.xlwings.org/

xlwings is an open source package that allows you to automate Excel with Python on Windows and macOS. Write Excel macros and UDFs in Python.

Automate Excel with Python (Open Source and Free)

@VisualStuart @Rhodium103 yeah, but why can't MS just implement such a solution?

Oh yeah, forgot, they can't track the users without running in the cloud 🙈

@jr @Rhodium103 Perhaps you could read the announcement before going on about conspiracy theories?
@VisualStuart @Rhodium103 I did and there is exactly no reason why they need to run it inside the cloud...

@jr Thre's no valid reason for it, but marketing bullshit and money…

They do it to make profit from libre software's community work and charge people for using "their innovative cloud service". Won't take long before "but it has powerful cloud scripting features… libreoffice sucks cause it doesn't have it¹" will become the next "msoffice is better/required for professionnal work" argument…

@VisualStuart @Rhodium103

@jr

1. Obviously, LO doesn't need to fucking charge people to use a damn scripting language, which has been available to everyone, and runs perfectly fine on users' own computers…

@VisualStuart @Rhodium103

@VisualStuart @jr @Rhodium103 No need to read marketting language. if you bring MS, cloud and running a powerful "script" language in a program used by accountants, something, in fact lots of things bound to explode anyway...
@VisualStuart @Rhodium103 I wouldn't want MS to give a look at my expenses to "personalise" my ad experience. (Now that's a different thing that I use none of MS' browser, OS, Office suite, search engine or even VSC that it can do so. And keep the powerful content blocker uBlock origin aside for some time being)
@VisualStuart @Rhodium103

I suspect portability is a reason too. One of python's biggest weaknesses has always been that package management is a mess. Virtual environments, wheel, pip, and --install are such a mess that Docker containers are one of the more popular solutions.

Everything pointing to the same dev environment on the cloud is a much easier way to pull that off for most normies.
@VisualStuart if they genuinely didn't consider the monetization they are terrible businesspeople, which I don't think they are
@VisualStuart @Rhodium103 compute sandboxes have existed for decades.

@VisualStuart @Rhodium103 does this essentially remove the capability to read a local file via Python? unless it also finds all file references and upload resources to the cloud which could lead into a potential data privacy concern? I guess the real question is how much Python power do I really have access to…

I’d be fairly happy with a dialogue box warning me that the execution should be considered ‘unsafe’ every time I add a bit of python to a sheet if it doesn’t already.

@VisualStuart @Rhodium103 There isn't a restricted Python interpreter that doesn't have any functions with direct API access or local file access in any possible code path?

@VisualStuart @Rhodium103 and why could they not have written a proper sandbox in Excel?

Does Python have more resource access than VBA? Or does Python-in-Excel have a different security model?

I actually wrote a very simple Python sandbox with execv, globals and locals. A company and development team for MS Office could surely have implemented a secure sandbox? Especially since they had to do that anyway: just in the cloud.

@VisualStuart @Rhodium103

Are there any details on pricing? The press release only mentions that there will be features restricted later as paid.

They use a similar security model as with Excel VBAs: once a Workbook is deemed secure, it executes all the Python in it.

Cloud computing costs and it is easy to write expensive operations in Python or end up in infinite loops. Could Excel-in-Python users end up paying sky high cloud computing bills after opening a Workbook from a co-worker with a cell on sheet 12 calculating the factorial of 5000? With a local execution, you'll at least notice that your excel is slowing down drastically. With cloud execution these costly operations are out of mind.

@VisualStuart @Rhodium103 I mean, surely they could just sandbox python properly? presumably they have to do that on the server end anyway
@Gaelan @VisualStuart @Rhodium103 It's better for them to have the inevitable jailbreak get used on their own systems than become the return of the macro virus

@Gaelan @Rhodium103 Just guessing here, I assume isolation on the server/cloud side is implemented using Kubernetes containers with images that have the absolute minimum required to run Python (reduced attack surface.) It doesn't seem reasonable to require end-user systems to have a Kubernetes host, download the container image, and manage the container instances to start quickly with a warm-start strategy for responsiveness.

I can try to connect you with the team if you have a better plan.

@Rhodium103 I say it was a terrible idea regardless of the implementation. but for real? this is INSANITY

python? big fan
excel? * runs screaming *

@Rhodium103 that is it - i have had it with these m*f*ing pythons in this m*f*ing cloud
@Chris Armstrong What could possibly go wrong?
@Rhodium103 ah, my third favorite functional programing language and my 2nd favorite imperative programing language
@Rhodium103 this one cracked me up good. Thanks for making this. 🤣😂
@Rhodium103 so no offline usage. Thanks, but no thanks.
@Rhodium103 Well, you can’t have the surveillance capitalism without the surveillance.
@Rhodium103 Does someone has python code for using those fancy CPU bugs to find some excelsheets with creditcard credentials?
@Rhodium103 @miah they should have kept the scheme backend. I think it was dropped in the 1990s

@Rhodium103

embrace, extend...
Then use that extension to grab the customer by the nads and never let go