Skip to content

Python Editor for Excel is out and essential

The Python Editor for Excel is a welcome innovation of the Microsoft Garage project making editing and debugging Python code in Excel a lot easier.

Python Editor add-on for Excel mirrors the functionalities of renowned integrated development environments (IDEs) using the code management system behind Visual Studio Code.

Sample code from A new way to get UTC time into Excel

From syntax highlighting and IntelliSense to automatic code completion and clean formatting, Python Editor borrows essential elements from top-tier IDEs and puts them into the Excel side-pane.

Python Editor in Excel features

Its advanced debugging capabilities allow users to see the result of each coding step, ensuring precision. Right-click to see familiar options like Go to Definition/Symbol and Peek.

Ideal for scripting longer code sequences that don’t nicely fit into the formula bar.

See the current result at the bottom of the code as either an Excel result or Python object.

Edit Python code iteratively without affecting data unless you choose to commit the changes, ensuring data integrity.

Line Numbering!  Useful when there’s an error on a specific line number (the formula bar doesn’t have line numbers).

If all this seems familiar, maybe you’ve used the Excel Advanced Formula Environment to handle large formulas, in particular LET() and LAMBDA() functions.

Get Python Editor in Excel

If you’re eager to elevate your coding within Excel, the Python Editor is accessible via the Office Add-ins Store.

It’s part of a single Excel Labs add-on which includes the Advanced Formula Environment and LABS.GENERATIVEAI function.

Microsoft Garage

If you’re unfamiliar with the Microsoft Garage, it’s a unique platform where Microsoft professionals from diverse teams collaborate to devise experimental software. These creations either evolve into standalone products or integrate into pre-existing Microsoft solutions.

Excel gets Python – who, when and why
A new way to get UTC time into Excel

Microsoft fixes a big hassle with Excel’s great Lambda()
Lambda – strange name for a really good extra in Excel
LET() assigns names to calculations in Excel

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.