Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
oa — Office Automation CLI
A Windows CLI tool that automates Microsoft Office (PowerPoint + Excel) via the COM API. Built in Rust for speed and safety.
Takes a PowerPoint template with linked OLE objects and Excel data, then updates tables, charts, delta indicators, and color coding — producing a fully populated report in seconds.
Features
- Update pipeline — Re-link OLE objects, populate tables, swap delta arrows, apply color coding, update charts
- Batch processing — TOML runfiles for processing dozens of files in one command
- Validation — Cell-by-cell check of PPT values against Excel source data
- ZIP pre-processing — Rewrite OLE/chart paths and chart data directly in PPTX XML (100x faster than COM for links)
- Inspection — Read-only analysis of PPTX shape inventory with per-slide breakdown
Installation
Requires Windows with Microsoft Office (PowerPoint + Excel) installed.
One-liner (no Rust needed)
PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/albertxli/office-automation/main/install.ps1 | iex"
Downloads oa.exe, installs to %LOCALAPPDATA%\oa, and adds it to your PATH automatically. Restart your terminal after install.
Or download manually from GitHub Releases.
Via crates.io (requires Rust)
Build from source
Quick Start
# Update a presentation with new Excel data
# Batch process from a runfile
# Validate output against Excel
# Inspect a PPTX file
# Per-slide shape breakdown
Commands
| Command | Description |
|---|---|
oa update |
Run the update pipeline on PPTX files |
oa run |
Execute a TOML runfile for batch processing |
oa check |
Validate PPT values against Excel source |
oa info |
Inspect a PPTX file (read-only) |
oa diff |
Compare two PPTX files side by side |
oa config |
Show all config keys and defaults |
oa clean |
Kill zombie Office processes |
See API.md for full command reference with all options and examples.
Runfile Example
= "../data"
= "output/{name}.pptx"
[]
= "templates/template.pptx"
[[]]
= "Australia"
= "t1"
= "tracking_australia.xlsx"
[[]]
= "Japan"
= "t1"
= "tracking_japan.xlsx"
See example_runfile.toml for a complete example.
Pipeline Steps
The update pipeline runs these steps in order:
| Step | Description |
|---|---|
| Links | Re-point OLE links to the new Excel file |
| Tables | Populate PPT table cells from Excel ranges |
| Deltas | Swap delta indicator arrows based on value sign |
| Coloring | Apply sign-based color coding to _ccst tables |
| Charts | Update chart data links |
Steps can be selectively run or skipped:
Shape Naming Conventions
The pipeline identifies shapes by name prefix:
| Prefix | Type | Description |
|---|---|---|
ntbl_ |
Normal table | Updates cell text, preserves formatting |
htmp_ |
Heatmap table | Applies 3-color scale from Excel |
trns_ |
Transposed table | Swaps rows/columns from Excel |
delt_ |
Delta indicator | Arrow swapped by value sign |
delt<N>_ |
Delta indicator, set N | Same as delt_, but copies from the tmpl<N>_delta_* templates |
_ccst |
Color-coded | Cells colored positive/negative/neutral |
Multiple delta template sets
Delta arrows are replaced by copying a template shape from slide 1. When a deck needs more than one arrow style (for example arrows with text on most slides and text-free arrows on a few), number the set on both sides:
| Set | Shape prefix | Templates on slide 1 |
|---|---|---|
| 1 | delt_ (or delt1_) |
tmpl_delta_pos, tmpl_delta_neg, tmpl_delta_none |
| 2 | delt2_ |
tmpl2_delta_pos, tmpl2_delta_neg, tmpl2_delta_none |
| N | delt<N>_ |
tmpl<N>_delta_pos, tmpl<N>_delta_neg, tmpl<N>_delta_none |
The OLE name and the _pos/_neg/_none suffix work exactly as for delt_, e.g.
delt2_Rev_DE_pos. If a set's templates are missing, that set is skipped with a
warning and other sets still update. oa info lists every set found and its templates;
oa check validates all sets.
Performance
| Scenario | Time |
|---|---|
| Single 68-slide PPTX (155 OLE, 257 charts) | ~6s |
Batch 26 files via oa run |
~2m 36s |
| ZIP pre-relink (411 links) | 0.1s |