Metadata-Version: 2.4
Name: calcwright
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: License :: Other/Proprietary License
License-File: LICENSE
Summary: Calculate Excel workbooks without Excel: an Excel-compatible formula engine judged against Excel itself
Keywords: excel,xlsx,formula,spreadsheet,calculation,recalculate,openpyxl
License: Proprietary - free tier up to 2,000 formula cells; see https://calcwright.dev/
	pricing
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://calcwright.dev/docs
Project-URL: Homepage, https://calcwright.dev

# Calcwright

**Calculate Excel workbooks without Excel.** Load an .xlsx, set the inputs, read the outputs, and get the numbers
Excel would give: on a server, with no Office licence and no LibreOffice.

```python
import calcwright

wb = calcwright.load("pricing-model.xlsx")
wb["Inputs!B2"] = 120_000            # numbers, text, bools, dates; "=..." sets a formula
print(wb["Quote!C10"])               # recalculated on read
print(wb["Quote!A1:D20"])            # ranges come back as lists of rows
wb.save("quote-1042.xlsx")           # opens in Excel with the new values

report = wb.verify()                 # recompute every formula and compare with what Excel saved
print(report["matched"], "/", report["cells"])
```

Error values come back as `calcwright.ExcelError("#N/A")` objects, not exceptions; blank cells are `None`.

## Judged by Excel

Every workbook Excel saves stores the value it computed for each formula. Across the 15,871-workbook Enron corpus,
Calcwright reproduces Excel's value for **99.924% of 15,403,944 formula cells**. On the same 1,000 workbooks,
LibreOffice in headless mode reproduces 97.35%. Method and per-function results:
https://github.com/Huckcity/calcwright/blob/main/BENCHMARK.md

473 functions, including XLOOKUP, FILTER, SORT, UNIQUE, LET and LAMBDA, plus array and dynamic-array formulas,
structured table references, names, 3D references, data tables and Excel's number formats.

## Licence

Free for workbooks of up to 2,000 formula cells. A Developer licence ($249) or Team licence ($990), each a one-time
payment with 12 months of updates, removes the limit and covers commercial use: https://calcwright.dev/#pricing.
Install a key with `calcwright.install_licence(key)` or the `CALCWRIGHT_LICENSE` environment variable. Keys are
checked offline.

Made by ALGD LTD (NI744090). Microsoft Excel is a trademark of Microsoft Corporation; Calcwright is not affiliated
with Microsoft.

