What People Actually Use Python in Excel For

Excel
Python
Research
A qualitative review of real Python-and-Excel workflows across data cleaning, automation, modeling, visualization, reconciliation, and workbook integration.
Published

August 8, 2026

“Python in Excel” now describes several very different workflows. Sometimes Python executes inside an Excel workbook. Sometimes an add-in connects a browser or local Python runtime to Excel. And in many of the strongest production stories, Python runs completely outside Excel and the workbook remains the input, review, or delivery format.

To understand what users are actually doing rather than what product pages say they could do, this article synthesizes a purposive set of linked practitioner discussions and official documentation. The sources are not a representative sample of Excel users, but they reveal recurring ways people combine Python and Excel in practice.

The recurring use cases

The linked discussions point to six recurring application families. They overlap: one workflow can clean data, run a forecast, create a chart, and publish a workbook at the end.

Application family What practitioners describe Representative evidence
Data cleaning and reshaping Joins, pivots, text cleanup, type conversion, deduplication, and normalization. Why some users move from Power Query to Python
Recurring automation and report production Batch workbooks, invoice workflows, PDF processing, recurring reports, and file handling. An accountant’s automation examples and an invoice-processing case study
Modeling, statistics, and forecasting Optimization, time-series models, scenarios, simulation, and risk analysis. Practitioners describing optimization and ARIMA-style work and Microsoft’s supported scientific/statistical libraries
Visualization and dashboards Histograms, KPI graphics, model diagnostics, and specialized statistical plots. Practitioners describing plots, histograms, and KPI graphics and Microsoft’s Python visualization libraries
Validation, reconciliation, and controls Exceptions, duplicate detection, control totals, cross-system comparisons, and malformed-input checks. How a staff accountant uses AI to build deterministic tools
Custom functions and Excel integration Reusable worksheet functions, workbook automation, notebooks, and add-in interfaces. Microsoft’s custom-functions documentation and Boardflare’s workbook integration guide

flowchart LR
    A["Cleaning / ETL"]
    B["Automation / reports"]
    C["Modeling / forecasting"]
    D["Visualization"]
    E["Validation / reconciliation"]
    F["Functions / integration"]
    A ~~~ B ~~~ C ~~~ D ~~~ E ~~~ F

The more useful conclusion is qualitative: Python is rarely valuable because someone wants “Python syntax in a spreadsheet.” It is valuable when a spreadsheet workflow has crossed into work that is easier to express as software.

1. Data cleaning and reshaping

The most common analytical use case in the linked discussions is pandas-style transformation of tabular data.

Practitioners repeatedly describe tasks such as:

  • joining exports from different systems;
  • converting wide data to long form and back;
  • grouping and aggregating large tables;
  • correcting data types and missing values;
  • parsing irregular text;
  • normalizing JSON-like data;
  • deduplicating records;
  • applying regular expressions;
  • replacing long chains of helper columns.

This is not automatically an argument against Power Query. Power Query is often the better choice when the transformation is transparent, refreshable through standard connectors, and maintained by Excel-oriented users.

Python becomes attractive when the transformation is easier to understand as a short program, needs a library that Excel does not provide directly, or is already part of a larger Python analytical model.

2. Automation and recurring report production

Repeatable automation is another recurring task family, but this is also where the phrase “Python in Excel” becomes misleading.

Users describe workflows such as:

  • reading hundreds of XLSX or CSV files;
  • processing invoices and PDFs;
  • creating one workbook or worksheet per business entity;
  • renaming, moving, and archiving files;
  • refreshing reports;
  • combining data from APIs or databases;
  • creating recurring month-end or management-report packages.

Those jobs generally require Python around Excel, not merely Python running inside a workbook.

A browser or managed workbook runtime is deliberately bounded. If the job needs unrestricted local folders, desktop applications, scheduled execution, email, or arbitrary system integration, external Python, VBA, or another automation service is usually a better architecture.

The workbook can still be the artifact stakeholders receive. Python simply does not need to live inside it.

A concrete accounting example shows the scale that can make this worthwhile. In a property-management controller’s case study, the author reported adapting a ChatGPT-assisted Python template to six invoice vendors, identifying roughly ten more candidates, and uploading a monthly batch of 400 invoices in roughly 3–4 minutes. The result is anecdotal and self-reported, not a benchmark, but it is representative of the recurring many files + deterministic rules + Excel output pattern in the source material.

3. Modeling, statistics, forecasting, and simulation

This is the category where Python inside an Excel-centered workflow is especially compelling.

Practitioners discuss:

  • regression and nonlinear models;
  • time-series forecasting;
  • correlation and covariance analysis;
  • Monte Carlo simulation;
  • scenario analysis;
  • risk modeling;
  • demand and sales forecasts;
  • optimization;
  • specialized numerical methods.

The hybrid pattern is straightforward:

Excel assumptions and source data
              │
              ▼
        Python model
              │
      ┌───────┴────────┐
      ▼                ▼
interactive UI   worksheet outputs
      │                │
      └───────┬────────┘
              ▼
       stakeholder review

Excel remains useful for assumptions, review, reconciliation, and distribution. Python owns the part that benefits from explicit code, numerical libraries, or multidimensional data structures.

The Sales Scenario Analysis follows this pattern with workbook assumptions, reactive scenario controls, charts, and published worksheet results. The Demand & Inventory Planner shows the same notebook/workbook boundary for constrained replenishment decisions.

4. Visualization and dashboards

Python is also used for visualizations that are cumbersome to reproduce with normal Excel charts:

  • heatmaps;
  • probability distributions;
  • correlation graphics;
  • model diagnostics;
  • specialized statistical plots;
  • application-specific dashboard graphics.

The tradeoff is portability and editability. A Python-rendered chart can be analytically richer while still being less convenient for an Excel user who expects to restyle every element as a native Office chart.

The right question is not “which charting library is better?” It is whether the visualization is an analytical output of the model or a workbook artifact that users need to manipulate directly.

5. Validation, reconciliation, and controls

Accounting, finance, analytics, and operations discussions repeatedly show Python being used as a deterministic checking layer.

Typical work includes:

  • reconciliations;
  • duplicate and exception detection;
  • control totals;
  • cross-system comparisons;
  • malformed-input checks;
  • completeness tests;
  • rule-based classifications.

This is an important contrast with open-ended AI analysis. For high-consequence work, a short deterministic script with explicit checks can be rerun, tested, reviewed, and reconciled. The user does not have to trust a model’s unsupported conclusion.

The published templates illustrate that pattern inside a workbook-connected notebook: worksheet data and controls feed deterministic logic, which publishes results and diagnostics back to the spreadsheet.

6. Custom functions and interactive workbook tools

A separate group of users wants Python to behave less like an analysis cell and more like a reusable calculation or interactive layer for Excel.

They want:

  • reusable worksheet functions;
  • buttons or application controls;
  • workbook object access;
  • interactive notebooks;
  • repeatable workflows;
  • a way to package code for other workbook users.

This is where the current Python-in-Excel products diverge most sharply. Microsoft’s native Python centers Python calculation in worksheet cells. Browser add-ins such as Boardflare and xlwings Lite add different models for custom functions, notebook experiences, workbook interaction, and simplified interactive presentations. Local Python integrations can go further into desktop automation and unrestricted package environments.

The correct comparison is therefore not simply “does it run Python?” It is what kind of artifact does it let you deliver?

The strongest patterns by job function

Accounting and controllership

The most credible accounting stories are deterministic automation and control workflows: invoice processing, reconciliations, journal-entry support, consolidation checks, FIFO calculations, recurring reports, and exception detection.

Many of these require file-system or document-processing access and therefore run outside Excel. Python inside the workbook makes more sense for analytical controls and review tools over data already present in the workbook.

FP&A and finance

FP&A users repeatedly combine Excel and Python for data reshaping, forecasting, scenarios, variance analysis, valuation, simulation, validation, and dashboard preparation.

This is one of the strongest hybrid cases because Excel is already the stakeholder interface. The Python layer does not need to replace the workbook; it can make the model behind it easier to build and maintain.

Data analytics

Analysts use pandas, SQL, text/JSON processing, statistical models, machine learning, and specialized visualization. They are also more likely to own the code directly and use AI as a coding assistant rather than as the final analytical authority.

Operations and supply chain

Common patterns include inventory and demand forecasting, lead-time analysis, optimization, recurring exports, report assembly, and data-quality checks. File- and system-heavy workflows usually remain external; interactive decision tools can fit inside the workbook.

Engineering and scientific analysis

Engineering work includes curve fitting, simulation, numerical methods, domain-specific calculations, statistics, and specialized plotting. Package compatibility becomes especially important because some scientific libraries depend on native components that are not available in every browser or managed runtime.

Boardflare’s Nonlinear Curve Fitting and Demand & Inventory Planner are current templates for this pattern.

AI is changing who writes the code

A second theme in the practitioner evidence is that the person specifying the automation is increasingly able to create the code even when they are not a professional developer.

The common workflow is still surprisingly concrete:

  1. explain the business process to ChatGPT, Claude, Copilot, or a coding agent;
  2. ask for Python or VBA;
  3. run the generated code against test data;
  4. paste errors or unexpected output back into the assistant;
  5. refine the script;
  6. retain the resulting code as a deterministic tool.

External chat tools appear more often than integrated Copilot in the detailed end-to-end automation stories we reviewed, although the sample is far too small and self-selected to infer market share.

The more important distinction is AI-generated software versus AI-generated answers. In accounting and finance especially, users value the ability to inspect and rerun the resulting script.

That is also how Boardflare positions notebook AI: the assistant helps create or revise the notebook; the durable artifact is ordinary notebook source that can be reviewed and tested.

For the code-sourcing evidence, practitioner examples, and review implications, see How AI Is Changing Python Development in Excel.

Python inside Excel versus Python around Excel

A practical way to choose is to start with the operational boundary.

Requirement Often the better starting point
Bounded analysis over workbook data Native Python in Excel or browser Python
Reactive notebook with interactive UI Browser/add-in notebook runtime
Local files, many workbooks, PDFs, email, scheduling External Python
Transparent standard data shaping maintained by Excel users Power Query
Workbook events and deep desktop object-model automation VBA or an Excel-focused local integration
Unsupported native Python dependencies External or managed Python environment

These categories can coexist in the same business process. A robust finance workflow might use SQL or external Python for ingestion, Boardflare for the interactive planning notebook, and ordinary Excel formulas for transparent reconciliations.

What not to conclude from this research

This review does not show that a particular percentage of Excel users clean data with Python, that Python is replacing Excel, or that one execution model is universally better.

The source set is self-selecting and intentionally biased toward people discussing technical workflows. Product capabilities also changed during the research window.

What the evidence does show is a recurring division of labor:

Python handles transformations, models, automation, and reusable logic; Excel remains valuable for assumptions, review, communication, and distribution.

That is a more useful starting point than asking whether Python should “replace” Excel.

Methodology

The review uses a purposive set of public practitioner discussions plus official product documentation. Representative sources include Python as a middleman between Excel and Claude, Python around Excel for real-world use cases, accounting automation examples, a discussion spanning optimization, time series, preprocessing, and plotting, and Microsoft’s Python in Excel documentation.

This is directional qualitative evidence, not representative adoption research. Engagement metrics, issue counts, and user-reported outcomes measure attention and experience rather than successful deployment.

For the current product landscape, continue with Python in Excel Alternatives in 2026.