skillfed

formulas

Parse and compile Excel formulas and workbooks in python code.

formulas v1.3.4 3.3M downloads/30d#2,661 on PyPI499
Copyleft license EUPL 1.1+ Active released

What it is and what it does

Formulas is an interpreter that reads Excel formulas and workbooks, parses them into an abstract syntax tree, and compiles them into Python functions that can be executed independently of Excel. It handles both individual formula expressions and complete workbook models, including cell references, dependencies, and circular references. The package includes a command-line interface for calculating workbooks, converting them to portable JSON representations, testing them, and even exposing them as HTTP APIs.

The core use case is extracting computational logic from Excel spreadsheets into Python without needing Excel installed or using COM servers. It depends on numpy, scipy, schedula (for dependency resolution), and several utility libraries. The package is actively maintained and supports Python 3.6 through 3.13.

Use it for:

  • Extract and execute a single Excel formula in Python without loading the entire workbook
  • Load an Excel workbook, override input values, and calculate specific output cells programmatically
  • Convert an Excel model to a JSON file for version control and inspection without the original workbook
  • Compile an Excel workbook into a reusable Python function with fixed inputs and outputs
  • Test an Excel workbook directly from the command line to validate formulas and calculations
  • Expose an Excel model as a lightweight HTTP API so other applications can execute it remotely

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and compiles Excel formulas and workbooks into executable Python code without requiring Excel itself.

Yes, with license awareness. The package is actively maintained, has no known vulnerabilities, and offers genuine value for teams needing to extract Excel logic into Python without Excel dependencies. The copyleft license (EUPL 1.1+) requires careful review if you plan to distribute derivative works or integrate into proprietary software; internal use is generally safe. Install it if you regularly work with Excel models that need to run in Python environments.

Install

formulas on PyPI

pip

pip install formulas

uv

uv add formulas

poetry

poetry add formulas

Installing formulas

Before you install

Low friction install with a pure-Python wheel. Actively maintained as of August 2026 with recent commits and no known vulnerabilities. Depends on common scientific libraries (numpy, scipy, schedula) that are well-established.

License in practice

Licensed under EUPL 1.1+ (copyleft). Users must comply with copyleft obligations when distributing derivative works; proprietary use requires careful review of license terms.

Quickstart

pip install formulas

import formulas
func = formulas.Parser().ast('=(1 + 1) + B3 / A2')[1].compile()
result = func(1, 5)  # Pass values for A2, B3

Verify before relying

  • Whether all Excel functions are supported or only a subset
  • Performance characteristics when handling large workbooks with many dependencies
  • Exact scope of circular reference handling mentioned in docs

Package facts

License EUPL 1.1+ (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 8 — click, regex, schedula, numpy, python-dateutil, numpy-financial, scipy, tqdm
Maintenance actively maintained — 156 days since the last release
Last repo commit
First released
Downloads 3,322,303/month — #2,661 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: formulas-1.3.4-py2.py3-none-any.whl

Keywords: python, utility, library, excel, formulas, processing, calculation, dependencies, resolution, scientific, engineering, dispatch, compiling

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)Natural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

excel formula parserconvert excel to pythonexcel workbook compilerexecute excel formulas pythonexcel calculation enginespreadsheet formula interpreterexcel model to code
excel-interopformula-parsingspreadsheet-automation

More Scientific/Engineering packages