Examples
Examples are organized by the problem being solved rather than by product feature. Each one shows how workbook data, reactive Python, notebook outputs, and optional worksheet publication fit together.
Example gallery
These examples are things you can do with Python for Excel, not separate Boardflare products. Each showcase pairs workbook data with a reactive Python notebook.
Use the gallery to find a problem close to yours, then inspect how the notebook reads Excel data, structures the analysis, validates results, and optionally returns selected outputs or functions to the worksheet.
Featured interactive browser demos
Try the notebook model directly in your browser without installing the Excel add-in:
- Sales Scenario Analysis (Starter) — beginner live demo showing pandas dataframes, reactive discount slider, Matplotlib chart, and
=BF.OUTPUT("summary"). - Demand & Inventory Planner (Operations) — supply chain replenishment with multi-sheet inputs, service level targets, cash budget constraints, and custom
=BF.FUNCTION("safety_stock"). - Curve Fitting (Engineering & SciPy) — SciPy nonlinear parameter estimation, covariance error analysis, confidence bands, residual diagnostics, and
=BF.FUNCTION("predict").
Forecasting and scenario modeling
Revenue Command Center
Finance / planning · scenario forecasting · SciPy Sobol QMC
Workbook drivers and seasonality feed a multi-step revenue model. Notebook controls change scenario, growth lift, and risk multiplier; Python handles deterministic and quasi-Monte Carlo forecasts, diagnostics, and charts. The notebook also publishes KPI/forecast tables and a project_arr worksheet-callable function.
Reconciliation and validation
Close Reconciliation
Accounting / controllership · controls · exception routing
Reconciliation rows and control settings feed tolerance logic, summary/detail outputs, review scope, and a live variance_status function. The notebook keeps control totals, exception logic, and explanatory output together as one reviewable analysis.
Quality Control
Manufacturing / engineering · SciPy statistics · exception detection
Measurement data feeds capability metrics, confidence intervals, normality and line-effect tests, control limits, visual diagnostics, and an exception queue. The notebook also publishes a z_score function.
Planning and optimization
Inventory Planner
Operations / supply chain · service levels · constrained replenishment
SKU demand, variability, lead time, and cost inputs feed service-level safety-stock and purchase recommendations under a budget constraint. The notebook publishes summary/detail results and a reusable safety_stock function.
Portfolio Optimizer
Capital planning · optimization · explainable constraints
Project economics and constraints feed an allocation search over budget, headcount, mandatory projects, strategic weighting, and risk appetite. The notebook publishes selected-project detail, summary metrics, and a risk_adjusted_value function.
Data cleaning and reshaping
Customer Cohorts
Analytics · pandas cleaning · reshaping · reconciliation
Messy transaction data is normalized into cohort/segment views with label cleaning, control-total reconciliation, and a published detail table. A clean_customer function exposes one deterministic cleaning rule back to Excel.
Scientific and engineering analysis
Curve Fitting
Engineering / scientific analysis · nonlinear estimation · uncertainty
Worksheet observations feed SciPy curve fitting with model selection, covariance-based parameter uncertainty, confidence bands, residual diagnostics, and live predictions. The notebook publishes summary/detail outputs and a predict function.
Learning demos
- Sales Scenario Starter — editable starter for workbook inputs, reactive analysis,
BF.OUTPUT(), andBF.FUNCTION(). - Email Extractor — editable notebook that reacts to worksheet text and publishes an extraction function.
The reusable pattern
The examples differ by domain, but they share the same notebook architecture:
Excel data / assumptions
↓
bf.inputs()
↓
reactive Python notebook
code • Markdown • models • diagnostics • controls
↓
notebook results stay in the notebook
├───────────────┐
↓ ↓
BF.OUTPUT() BF.FUNCTION()
↓ ↓
Excel consumes selected notebook work
Not every notebook needs every branch. A useful analysis can remain entirely in the notebook; worksheet publication is there when Excel needs to consume selected results or reusable calculations.
Browser demo versus Excel
The public examples use the standalone Univer host so they can be tried without an Excel installation. Excel adds its own persistence and streaming custom-function lifecycle behavior.
Before relying on a demo pattern in a distributed workbook, validate save/close/reopen, cold start, intended Edit/App presentation, and second-user behavior in the actual Excel add-in.
Detailed example: Revenue Command Center
The Revenue Command Center shows why a notebook becomes useful when Python work grows beyond a small cell calculation. Workbook assumptions feed a coherent reactive analysis containing scenario controls, deterministic forecasting, simulation, diagnostics, charts, worksheet outputs, and a reusable Python function.
Open the Revenue Command Center demo
Excel remains the assumptions surface
The workbook exposes the inputs that a finance or planning user would reasonably expect to review in Excel. The current demo reads two structured blocks from the Drivers sheet:
inputs = bf.inputs(
drivers=bf.ref("Drivers!A4:B12", headers=True),
seasonality=bf.ref("Drivers!A15:B27", headers=True),
)
inputs
The driver table includes starting monthly recurring revenue, new-business growth, churn, gross margin, operating expense, volatility, target ARR, and simulation count. A second table supplies monthly seasonality factors.
Excel remains the durable place for those assumptions. Python does not need to hide them inside notebook-only state.
The notebook keeps the analysis together
The notebook adds transient controls for:
- Scenario: Base, Upside, or Downside;
- Growth lift: an incremental growth adjustment;
- Risk multiplier: scales forecast volatility.
Changing either a workbook assumption or a notebook control flows through the same reactive dependency graph. The controls sit next to the model, explanation, diagnostics, and charts rather than requiring extra worksheet plumbing.
Deterministic forecast
The model calculates a 12-month MRR path using workbook growth, churn, and seasonality assumptions plus the selected scenario and growth-lift control.
From that path it derives metrics including:
- annual revenue;
- ending ARR;
- EBITDA;
- EBITDA margin.
The example is intentionally illustrative rather than a claim about one correct production forecasting methodology. Its purpose is to show how domain logic can live as normal Python while Excel remains the assumptions and review layer.
Quasi-Monte Carlo simulation
The same notebook runs a vectorized risk forecast with NumPy and SciPy's Sobol quasi-random sequence. The current demo:
- reads the requested simulation count from the workbook but enforces a minimum of 500 paths;
- generates a scrambled Sobol sequence with the fixed seed
20260810for reproducible demonstrations; - maps the Sobol uniforms through SciPy's normal inverse CDF;
- applies workbook volatility adjusted by the notebook risk multiplier;
- calculates P10, P50, and P90 ARR paths;
- calculates the probability that ending ARR reaches the workbook target.
Because Sobol generation uses powers of two internally, the notebook generates the next power-of-two sample and then slices it to the requested path count.
The notebook displays a chart comparing the selected deterministic scenario with the P10-P90 range, median path, and target. This is the intended division of labor: Excel is convenient for assumptions and review; NumPy and SciPy are natural tools for vectorized simulation; the notebook keeps the entire analysis understandable in one place.
Excel consumes selected notebook results
The notebook publishes two output tables:
bf.publish(
outputs={
"kpis": kpis,
"forecast": forecast,
},
functions={
"project_arr": project_arr,
},
)
Excel can consume those live results with formulas such as:
=BF.OUTPUT("kpis")
and:
=BF.OUTPUT("forecast")
The notebook does not become a dead-end dashboard. Excel can use selected results in reports, reconciliations, downstream formulas, or other sheets.
One Python implementation, reusable from Excel
The example also publishes project_arr, a short function that projects ARR for a requested period count and optional growth delta.
=BF.FUNCTION("project_arr", 12, C6)
The second argument is optional in Python (growth_delta=0.0), so a worksheet can also call:
=BF.FUNCTION("project_arr", 12)
This is the key worksheet-function pattern: the complex implementation lives once in Python, while Excel users call it where they need it.
How the example maps to the four notebook advantages
| Notebook advantage | What this example shows |
|---|---|
| One coherent Python workspace | Forecasting, simulation, diagnostics, controls, and charts live in one reactive analysis. |
| Excel can consume the notebook | BF.OUTPUT() returns KPI/forecast tables and BF.FUNCTION() exposes project_arr. |
| The notebook can become the interface | The same controls and outputs can be presented in App mode if the workbook becomes a repeatable tool for another user. |
| Portable Python source | The notebook is represented as Python source rather than only as code distributed through worksheet cells. |
App mode is not required for this example to be useful. An analyst can work entirely in Edit mode and still receive the main benefits of the notebook architecture.
What this example is intended to prove
The Revenue Command Center is useful as a broad reference because one notebook demonstrates:
- live Excel-to-Python input binding;
- marimo reactivity;
- multi-step domain logic;
- NumPy/SciPy numerical work;
- diagnostics and visual output;
BF.OUTPUT();BF.FUNCTION();- optional App-mode presentation;
- saved notebook source that reconstructs the live analysis when reopened.
Try it
Open the Revenue Command Center directly, or choose it from the Python demo catalog.
The browser demo uses Univer rather than Excel as its spreadsheet host, so Excel-specific behavior—especially persistence and custom-function startup—should be validated in the actual Excel add-in. See Architecture for the host model and Sharing and Trust for distribution guidance.