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
Metadata
Release files for autoffice 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autoffice-0.2.0.tar.gz | 17.5 kB | With provenance | Details for autoffice-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoffice-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for autoffice-0.2.0-py3-none-any.whl |
Total release size: 29.2 kB
Release files / autoffice-0.2.0.tar.gz
| Download URL | autoffice-0.2.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb1e81c9f8eca0876d44882e3ff1dd13764318d476faa2b88f818b903cb395cf
|
|
BLAKE2b-256 checksum How to use checksums |
ba5d6c006279b6ca9e8f834be2a3d2b2c3b6453fa296d8819187399352f0ed1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / autoffice-0.2.0-py3-none-any.whl
| Download URL | autoffice-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65feb92b7f9387a8839ca41995ecd498a702d238ff5814fe811dd3d20088644e
|
|
BLAKE2b-256 checksum How to use checksums |
e36461bf7c551df08e5aecd9f8ad1ac2f5b13bea88fe04ac22fb248fda86578f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for autoffice 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for autoffice-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.