Excel Blog:
What is happening?
Back in September, we shipped a new experiment to the Excel Labs add-in. This experiment allows you to write and edit Python formulas in Excel using a dedicated code editor with similar capabilities as those available in Python notebook environments.We are happy to share that we are making the editor available as an in-the-box option, and we have improved the appearance and usability of the Python Editor. You’ll see a slightly different user interface that stays faithful to the original design, and we have more to come!
The Python Editor enhances the Python in Excel experience by providing a bigger editing space for writing larger code blocks as well as productivity features.
From the Python Editor, you can see a list of all the Python cells in your spreadsheet. Each cell is treated like that of a code cell in a Jupyter notebook. Within the Python Editor pane, you can edit the cells and run them. The output of the Python cell can be displayed natively in your Excel spreadsheet, whether it is plain text, numeric, or even a visualization or DataFrame.
This new Python Editor is powered by the same technology that supports notebooks in other popular Microsoft products so you can use the full range of editor features like Intellisense, colorization, and function help as you code in Excel.
With the addition of the Python Editor as a built-in Python in Excel feature, we are excited to further enhance your Python development experience.
What are the benefits of the Python Editor?
The Python Editor offers several benefits when writing and editing Python formulas in Excel.See the flow of code execution with results: The Python Editor shows Python cells in execution order in addition to the output of each cell’s code, which can help you more easily debug and understand your code. This is useful because, Python in Excel cells execute in row major order.
Easily edit longer chunks of code: The Python Editor provides a new way to create and edit your Python code, offering more immersion when working with longer scripts.
Gain flexibility with coding workflows: The Python Editor allows you to write code, click elsewhere in the application, but not commit the code to Excel until you are happy with it. This gives you more flexibility and control over when and how you apply your code to your workbook. Additionally, when in manual recalc mode, editing and committing from the Editor will calculate just that cell (like a notebook) providing a faster feedback loop.
Try it today!
For the near term, there will still be two versions of the Editor, making it available wherever Python in Excel is available.Built into Excel: If you are using Insiders: Beta, we have now begun the rollout and you can try out the feature by going to the ribbon and opening the “Editor” button in the “Formulas” tab. It’s next to Insert Python.
Excel Labs: The Python Editor will remain in Excel Labs as we ship to additional audiences. If you aren’t in Insiders: Beta, please refer to our original blog post for installation instructions.
Access Requirements
You need to have access to Python in Excel to make use of the Python Editor. For more information on how to get access to Python in Excel, please check out our accompanying post Python in ExcelWe want your feedback!
Excel and Python users can give feedback directly within the application (go to Help > Feedback), suggest improvements on our Feedback portal, or engage with our team on GitHub. Source:
Graduating the Python Editor to Insiders: Beta
Moving from an add-in experiment to an in-the-box offering
techcommunity.microsoft.com