Python for Excel

A Python application environment for Excel: build reactive notebook logic around workbook data, publish results and functions back to Excel, and hand off a focused App presentation.
A Python application environment for Excel

Build substantial Python logic around the workbook without turning the worksheet grid into the application source code. Keep Excel for data, assumptions, review, and delivery; use one reactive notebook for transformations, models, diagnostics, controls, and reusable functions.

When the work becomes a repeatable tool, save the same notebook with the workbook and reopen it in a focused App presentation for downstream users.

Get it from Microsoft AppSource

Demand and Inventory Planner workbook with a reactive Python notebook open beside Excel Demand & Inventory PlannerWorkbook-driven optimization applicationTry live →

From workbook author to workbook application

Boardflare is most differentiated when a workbook has a technical owner and downstream users.

  1. The author works in Edit mode, connects workbook inputs, writes and tests Python, adds controls and charts, and publishes workbook-facing outputs or functions.
  2. The notebook source and preferred opening presentation are saved with the workbook.
  3. A workbook user can reopen the same notebook in App mode and operate the intended controls and outputs without the normal authoring surface.

flowchart LR
    A[Excel workbook<br/>data + assumptions] --> B[Reactive Python notebook]
    B --> C[Notebook results<br/>controls + charts]
    B --> D[Excel outputs<br/>BF.OUTPUT]
    B --> E[Excel functions<br/>BF.FUNCTION]
    B --> F[App mode<br/>focused handoff]

App mode is optional and remains the same saved notebook. It is a presentation boundary, not a permissions, encryption, or source-protection boundary. See App mode and sharing before distributing executable workbooks.

Why use a notebook here?

Keep one coherent Python workspace

Keep transformations, models, validation, Markdown, intermediate results, charts, diagnostics, and controls together. Marimo reactivity reruns dependent cells when upstream values change so code and outputs stay consistent.

Let Excel consume selected results

Read live workbook values with bf.inputs(), publish named outputs with BF.OUTPUT(), and expose centralized Python calculations through BF.FUNCTION() while workbook users keep the worksheet interface they already understand.

Turn the same notebook into the interface

A notebook can contain controls, tables, charts, explanations, and reactive outputs. When the workflow becomes repeatable, App mode presents that same saved notebook as a simpler operating surface.

Keep the implementation inspectable

A marimo notebook is Python source. The source is saved with the workbook and remains suitable for review, diffing, backup, and version control when your workflow supports those practices.

Learn by task

Work with Excel

Read cells and ranges, return results with BF.OUTPUT(), create worksheet functions with BF.FUNCTION(), and check supported values and limits.

Working with Excel →

Build reactive notebooks

Structure larger analyses, use marimo reactivity, add controls and charts, and work with packages in the browser runtime.

Building notebooks →

Hand off an application

Choose Open as: App, understand the presentation boundary, and validate the workbook before another person operates it.

App mode and sharing →

For comparison and exact behavior, use Boardflare vs. Microsoft Python in Excel, Excel ↔︎ Python type conversion, Troubleshooting and reference, or the current template catalog.

Product boundaries to understand

Runtime and executable-workbook trust

Python executes in the browser by default, but authored notebook code can make browser-permitted network requests and load packages. Treat a notebook-enabled workbook as executable source and review what it reads, publishes, and contacts.

Security and data flow →

AI authoring is a separate data path

Notebook AI can draft, revise, explain, debug, and complete source using the context supplied to the request. It does not independently inspect arbitrary workbook cells or verify a business result.

AI authoring →

App mode changes presentation, not permissions

The workbook still contains the saved notebook source. App mode is intended to simplify operation, not hide implementation or enforce access control.

App mode and sharing →

What this is for

Python for Excel is most compelling when the Python work is substantial enough to benefit from being understood as a coherent program while Excel still matters to the workflow. Common fits include data cleaning, forecasting, regression, simulation, optimization, reconciliation, scientific analysis, interactive analytical tools, and reusable calculations with one centralized implementation.

Use ordinary Excel formulas when they remain clear and maintainable. A small native Python-in-Excel calculation can also be a good fit when the Python naturally belongs to a worksheet cell. Use external Python when the workflow centers on unrestricted file-system automation, scheduled jobs, desktop automation, databases, large batch processing, or packages that require capabilities unavailable in a browser runtime.

Reference and implementation details

Most workbook authors do not need transport internals. For engineering and security review, see Architecture and Runtime and Security and Data Flow. For symptom-driven recovery and exact public API behavior, use Troubleshooting and reference. Workbooks that still use the earlier standalone function-authoring workflow are covered by Legacy Functions Editor.