Welcome to Excel Jet Consult blog post. In this blog post, I am going to wslk you through how to enable the Excel Labs add-in which is an editor that we can use to author Python code in Excel using the new PY function. Let’s get started.
The Python Editor is a new addition to Excel Labs that allows users to write and edit Python formulas in Excel using a dedicated code editor with similar capabilities similar to other Python independent environments such as Jupyter Notebook. The Python Editor is designed to complement the Python in Excel experience with an editing surface optimized for more complex and longer Python code snippets.
The Python Editor offers several benefits when writing and editing Python formulas in Excel. The Python supports many of the features that Visual Studio Code offers for Python development, such as IntelliSense, formatting, code completion, and syntax highlighting.
How to Get the Python Editor
To get the Python Editor, we need to go to the Office Add-ins. To get there
In the Insert tab of the ribbon, click on Get Add-ins or in the search box at the top of the Excel workbook, type in Insert Add-ins
- In the Office Add-ins window, search for Excel Labs
- Locate the Excel Labs and click on the Add and Continue.
The add-in should be visible in the far right corner of the Home tab.
- Click on the Excel Labs, scroll down and locate Python Editor. If you’re happy to make it the default, check the Make Default
- Click Open. That will open the Python Editor environment where we can start authoring our python code for analysis