Skip to main content

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 1 is 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_size must 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:

  1. Lint — ruff + mypy
  2. Tests — pytest on Python 3.11, 3.12, and 3.13
  3. Build — PyInstaller binaries for five platform targets
  4. Deb.deb packages for amd64 and arm64
  5. Release — GitHub Release with all binaries and .deb files (triggered by v*.*.* 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 / .xlsm support
  • 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

autoffice-0.2.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoffice-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

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

Hashes for autoffice-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eb1e81c9f8eca0876d44882e3ff1dd13764318d476faa2b88f818b903cb395cf
MD5 bcf53432396c35f114daa1155704c20a
BLAKE2b-256 ba5d6c006279b6ca9e8f834be2a3d2b2c3b6453fa296d8819187399352f0ed1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoffice-0.2.0.tar.gz:

Publisher: ci.yml on farland-pkgs/autoffice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for autoffice-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65feb92b7f9387a8839ca41995ecd498a702d238ff5814fe811dd3d20088644e
MD5 1cb601a6f2a16e92dacf33383190ce0c
BLAKE2b-256 e36461bf7c551df08e5aecd9f8ad1ac2f5b13bea88fe04ac22fb248fda86578f

See more details on using hashes here.

Provenance

The following attestation bundles were made for autoffice-0.2.0-py3-none-any.whl:

Publisher: ci.yml on farland-pkgs/autoffice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page