--- id: formulas version: "1.3.4" license: EUPL 1.1+ license_treatment: copyleft maintenance: active --- # formulas — Parse and compile Excel formulas and workbooks in python code. License: copyleft · Maintenance: active · Downloads: 3.3M/mo ## 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 above — 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 pip install formulas uv add formulas 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: unspecified - Install friction: low - Maintenance: active - Downloads: 3.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags excel formula parser, convert excel to python, excel workbook compiler, execute excel formulas python, excel calculation engine, spreadsheet formula interpreter, excel model to code, excel-interop, formula-parsing, spreadsheet-automation [View on SkillFed](https://skillfed.io/packages/formulas) · [View on PyPI](https://pypi.org/project/formulas/)