Forum Discussion
EricAshton
Jun 08, 2025Copper Contributor
Making Python-in-Excel worth it
I feel like Python-in-Excel has huge promise. Embedding a Seaborn correlation matrix in an analysis sheet with a couple lines of readable code? Keeping multiple dimensions of data in one cell effi...
flexyourdata
Jun 10, 2025Iron Contributor
Hi Eric
With regards to your 3 points:
- There's really only one way to speed up and that's to buy the premium subscription of Python in Excel. You've no doubt found that the standard speed can be frustrating if you're working with it a lot.
- The xl() method is not a Python function. Strictly speaking it's a Macro that is resolved on the client-side before sending data to the runtime. So, there is no way for the argument inside that function to be a Python variable, because at the time it's resolved, the Python runtime can't see it. Strongly recommend you view this video to learn a lot about how to use xl() (as well as other things):
https://youtu.be/8cbdCISh4qg?si=RQqV-VXUbOxyztzE
Specifically, see the comment I left in that thread and time 24:20 for a description of why the xl() method is a macro and not a function. - I agree with you and while I can't speak for the product team, I suppose better debugging in the Python Editor will be forthcoming in the not-too-distant future.
I've also sent you a message and a connection request on LinkedIn.
Cheers
Owen