Autoffice
A local-first command-line tool for automating Microsoft Excel (.xlsx) files.
Reads a JSON mapping file, updates one or more cells across one or more worksheets,
optionally applies formatting changes, and saves the result as a new workbook —
without ever touching the original file.
Works on Linux x86_64, Linux ARM64, Raspberry Pi, Android Termux, Windows, and macOS. Pure Python runtime — no Rust, Cargo, or compiler required.
Install
pip install autoffice
Or download a pre-built binary from the Releases page (no Python required):
| Platform | File |
|---|---|
| Linux x86_64 | autoffice-linux-x86_64 |
| Linux ARM64 (Raspberry Pi, servers) | autoffice-linux-arm64 |
| Windows x86_64 | autoffice-windows-x86_64.exe |
| macOS Intel | autoffice-macos-x86_64 |
| macOS Apple Silicon | autoffice-macos-arm64 |
| Debian/Ubuntu amd64 | autoffice_<ver>_amd64.deb |
| Debian/Ubuntu arm64 | autoffice_<ver>_arm64.deb |
Android Termux
On Android Termux, install via pip (the pre-built Linux binary uses glibc and will not run on Termux's Bionic libc):
pkg install python
pip install autoffice
Debian / Ubuntu (.deb)
wget https://github.com/your-org/autoffice/releases/latest/download/autoffice_0.2.0_amd64.deb
sudo dpkg -i autoffice_0.2.0_amd64.deb
Usage
autoffice fill <workbook.xlsx> <mapping.json> [--force]
Example:
autoffice fill report.xlsx data.json
Writes report_filled.xlsx next to report.xlsx.
Use --force / -f to overwrite an existing output file.
Mapping file format
Each key uses <SheetName>!<CellReference> notation.
{
"Sheet1!B19": {
"value": "Hasan",
"bold": true
},
"Sheet1!C19": {
"value": 50000
},
"Summary!A1": {
"value": "Completed",
"italic": true,
"font_size": 12
}
}
Cell update fields
| Field | Type | Required | Description |
|---|---|---|---|
value |
any | ✅ | New cell value (null clears the cell) |
bold |
bool | — | Set bold on/off |
italic |
bool | — | Set italic on/off |
font_size |
number > 0 | — | Font size in points |
Only the fields you specify are changed — all other font attributes (name, colour, underline, etc.) are preserved as-is.
Logging
Set AUTOFFICE_LOG_LEVEL to enable verbose output:
# Show what cells are being updated
AUTOFFICE_LOG_LEVEL=INFO autoffice fill report.xlsx data.json
# Full debug trace (workbook open, each cell, save path)
AUTOFFICE_LOG_LEVEL=DEBUG autoffice fill report.xlsx data.json
Accepted values: DEBUG, INFO, WARNING (default), ERROR.
Validation
Validation runs before any writes. If validation fails:
- No cells are modified
- No output file is created
- Exit code
1is returned - A human-readable error message is printed
What is validated:
- Key format must be
<SheetName>!<CellRef> - Cell reference must be valid (
A1,AA500, …) - Every referenced worksheet must exist in the workbook
font_sizemust be a positive number
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Validation or usage error |
2 |
Unexpected internal error |
Development
pip install -e ".[dev]"
# Run tests
pytest
# Lint & format
ruff check autoffice tests
ruff format autoffice tests
# Type-check
mypy autoffice
CI / CD
GitHub Actions runs automatically on every push and pull request:
- Lint — ruff + mypy
- Tests — pytest on Python 3.11, 3.12, and 3.13
- Build — PyInstaller binaries for five platform targets
- Deb —
.debpackages for amd64 and arm64 - Release — GitHub Release with all binaries and
.debfiles (triggered byv*.*.*tags)
To release a new version:
# Bump version in autoffice/__init__.py and pyproject.toml, then:
git tag v0.2.0
git push origin v0.2.0
Compatibility
| Platform | pip install | Binary |
|---|---|---|
| Linux x86_64 | ✅ | ✅ |
| Linux ARM64 | ✅ | ✅ |
| Android Termux ARM64 | ✅ | ❌ (glibc binary, use pip) |
| Raspberry Pi | ✅ | ✅ (arm64) |
| Windows x86_64 | ✅ | ✅ |
| macOS Intel | ✅ | ✅ |
| macOS Apple Silicon | ✅ | ✅ |
Python versions: 3.11, 3.12, 3.13
Non-goals (v1)
- Formula evaluation
.xls/.xlsmsupport- YAML / CSV input
- Template engines
- Cloud services / COM automation
- GUI
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoffice-0.2.0.tar.gz.
File metadata
- Download URL: autoffice-0.2.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb1e81c9f8eca0876d44882e3ff1dd13764318d476faa2b88f818b903cb395cf
|
|
| MD5 |
bcf53432396c35f114daa1155704c20a
|
|
| BLAKE2b-256 |
ba5d6c006279b6ca9e8f834be2a3d2b2c3b6453fa296d8819187399352f0ed1c
|
Provenance
The following attestation bundles were made for autoffice-0.2.0.tar.gz:
Publisher:
ci.yml on farland-pkgs/autoffice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoffice-0.2.0.tar.gz -
Subject digest:
eb1e81c9f8eca0876d44882e3ff1dd13764318d476faa2b88f818b903cb395cf - Sigstore transparency entry: 2334250773
- Sigstore integration time:
-
Permalink:
farland-pkgs/autoffice@1c28bfb56ea7ee7e6bc623cb18b29e5ea05bf942 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/farland-pkgs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1c28bfb56ea7ee7e6bc623cb18b29e5ea05bf942 -
Trigger Event:
push
-
Statement type:
File details
Details for the file autoffice-0.2.0-py3-none-any.whl.
File metadata
- Download URL: autoffice-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65feb92b7f9387a8839ca41995ecd498a702d238ff5814fe811dd3d20088644e
|
|
| MD5 |
1cb601a6f2a16e92dacf33383190ce0c
|
|
| BLAKE2b-256 |
e36461bf7c551df08e5aecd9f8ad1ac2f5b13bea88fe04ac22fb248fda86578f
|
Provenance
The following attestation bundles were made for autoffice-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on farland-pkgs/autoffice
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autoffice-0.2.0-py3-none-any.whl -
Subject digest:
65feb92b7f9387a8839ca41995ecd498a702d238ff5814fe811dd3d20088644e - Sigstore transparency entry: 2334250811
- Sigstore integration time:
-
Permalink:
farland-pkgs/autoffice@1c28bfb56ea7ee7e6bc623cb18b29e5ea05bf942 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/farland-pkgs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@1c28bfb56ea7ee7e6bc623cb18b29e5ea05bf942 -
Trigger Event:
push
-
Statement type: