Anaconda, the company behind the Python distribution of the same name, has announced a new Python extension for Excel. Anaconda Code makes it possible to run Python code from Excel on your computer.
Advertisement
The extension, which is part of the Anaconda Toolbox, closes a gap in Python for Excel, which Anaconda presented in partnership with Microsoft in 2023. The fact that Python for Excel executes code not locally but in the Microsoft cloud was a criticism of the extension.
Locally with WebAssembly
To execute the code directly on the computer, Anaconda code uses PyScript. This project, presented for the first time at PyCon 2022, also comes from Anaconda. It uses WebAssembly to integrate with the browser. This allows Python code to be executed directly in a browser-based Excel add-in.
PyScript is based on Pyodide, a project for Python applications in the browser originally started by Mozilla. By default, Anaconda code depends on the current Pyodide release, but the version can be customized, as can the underlying Python packages. However The document indicates thatthat some compiled packages are not compatible with PyScript’s WebAssembly engine.
Anaconda code can be supplemented with individual Python packages.
(Image: Anaconda)
The heart of Anaconda Code is the dashboard. From there, code for a cell can be entered, edited, and executed, and an area of ​​the spreadsheet can be linked to the code. For example, the command creates
to_array(REF())
A NumPy array from an Excel range.
The workbook settings provide further configuration options. Among other things, the “Run Isolated” mode means that the code runs separately for each cell and does not have access to variables defined in other cells. In contrast, in the Run Linked mode, variables from one cell are available in subsequent linked cells.
Toolbox in the cloud
However, it doesn’t work fully without the cloud: the extension is part of the Anaconda Toolbox for Excel, which Requires an Anaconda.cloud account. In addition to Anaconda code, the toolbox includes connectors for sharing data in Excel and notebooks in Anaconda.Cloud, a tool for creating and sharing code snippets, and a tool for creating visualizations.
The toolbox also offers a ChatGPT-like AI assistant that responds to prompts, for example generating Python code for a specific task or creating a chart from a table area and customizing it interactively.
The wizard suggests different ways to aggregate or summarize the data.
(Image: Anaconda)
During the beta you can use Anaconda Toolbox Available via Microsoft AppSourcetry it for free.
(RME)