Skip to content
SchlafliedPublic

About

Agent workflow for extracting, cleaning, matching, verifying, and delivering local or cloud spreadsheets

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Excel-Ops logo

Excel-Ops

中文说明 | English

Latest release: v0.5.1 — Maintainability pass

I hate VLOOKUP. This is why.

Excel-Ops is a conversation-driven workflow for AI agents, not another spreadsheet web app, and definitely not an AI formula generator. Give an agent the files and describe the outcome in plain language; the agent plans the operation, picks the right local or cloud connector, isolates whatever it isn't sure about, verifies the result, and hands back a delivery package — not a guess dressed up as an answer.

The reason VLOOKUP is annoying was never the formula. It's that real spreadsheets have inconsistent names, duplicate records, shifting headers, and dates that don't agree with each other. This design comes from a real, recurring reporting workflow — reconciling messy multi-source records by hand, week after week — not a hypothetical use case dreamed up for a demo. Excel-Ops treats that mess as an operational workflow instead of pretending a single function can paper over it:

ingest → extract → normalize → match → human review → write → verify → deliver

It's a companion project to PPT-Ops: PPT-Ops turns source material into a reviewable presentation delivery, Excel-Ops turns images and messy tabular inputs into a reviewable data delivery.

Excel-Ops's verification-first core — data validation before any claim of success — continues design work its author first did as a contributor to Career-Ops, a job-search automation project maintained by others. The author designed Career-Ops's full "Jurisdiction Umbrella" system, and Excel-Ops reuses that same design thinking; refresh.mjs's update-integrity check also follows Career-Ops's update flow. The two codebases share no code or data. The author is also a contributor to PPT-Ops.

Use with an agent

In Codex or another agent that follows the Agent Skills standard, invoke the repository skill:

Use $excel-agent to extract the rows from these screenshots, append only high-confidence records to the workbook, and put everything uncertain in a review sheet.

$excel-agent is the only user-facing entry point. The Python CLI remains an internal deterministic capability used by the agent and by automated tests.

Agents that support MCP can launch the local excel-ops-mcp stdio server. It exposes working-directory scan, validated delivery-plan preparation, read-only dry runs, and explicitly confirmed delivery while keeping all spreadsheet decisions in the existing Python core. See Agent MCP server.

The initial connector order is local XLSX/CSV, local cloud-sync folders, Google Sheets, Dropbox API, Feishu Sheets, and WPS Sheets. Cloud credentials belong to the user's environment and are never stored in a project or delivery package.

The first vertical slice focuses on a common business task: ingest XLSX or CSV rows (or provider-neutral image extraction JSON), detect their layout, validate them against a declared schema, and write only accepted records into an Excel workbook. Uncertain records go to a separate review sheet instead of being silently guessed. XLSX sheet selection is content-based, and an unrecognized layout stops the run instead of producing partial output.

What the MVP actually does

Feed it provider-neutral extracted JSON from screenshots, scans, receipts, or forms, and it will keep the source image name and extraction confidence on every row, validate required fields, and split the result: accepted rows go to Accepted, anything low-confidence or incomplete goes to Review instead of getting silently guessed at, and an Audit sheet logs counts and processing metadata. Fuzzy matching never gets to make the final call on its own.

None of the code or examples here came from a real production workflow — no customer files, addresses, payroll records, or credentials. The design was shaped by a real recurring reporting pipeline, but everything in this repo is synthetic.

Synthetic field example

Imagine a facilities team receiving weekly inspection records in several inconsistent spreadsheets and occasional phone screenshots. Each customer expects the results in a different workbook template.

Excel-Ops should:

  1. identify the input layout;
  2. extract and normalize each observation;
  3. match it to a declared destination using strict rules;
  4. place uncertain matches in a human review queue;
  5. write accepted records into the appropriate workbook layout;
  6. verify counts, dates and required fields before delivery.

Names, locations and identifiers in this repository are fictional. The example demonstrates the workflow without reproducing any organization's data or proprietary configuration.

Quick start

python -m pip install -e .
excel-ops examples/extracted-records.json output.xlsx
# The same command accepts .xlsx, .xlsm, and .csv inputs.

Pass --locale en-US (or another explicit locale hint) when date order or decimal separators are known. The delivery includes a Type Inference sheet, and the JSON result exposes field-level confidence and ambiguity counts. Numeric identifiers and leading zeroes remain text; ambiguous dates are sent to review rather than silently converted.

For the integrated ingest-to-verified-delivery run against declared workbook templates:

excel-ops deliver delivery-plan.json --dry-run   # the checkable plan, no file touched
excel-ops deliver delivery-plan.json             # write a staging copy, verify it, then deliver

See End-to-end delivery pipeline for the target declaration, the plan contract, the failure codes, and what is deliberately left out.

Every delivered output also gets a source-and-verification Manifest — which inputs, template, and Recipe version produced it, a per-tab breakdown, and the persisted file's own hash and row counts, re-verified against the real file rather than only the run's counters. See Delivery manifests.

The same verified workbook can be delivered as XLSX, CSV, or PDF. CSV and PDF capability loss is explicit; PDF export can use LibreOffice or local Microsoft Excel and is checked for page-layout problems. See Multi-format delivery.

Formula delivery is version-aware and verification-first: the agent can plan lookup, conditional-aggregation, or date formulas, apply formulas or static values to explicit ranges, and independently recalculate formula-mode output with Microsoft Excel or LibreOffice before delivery. See Formula planning.

See Agent workflow for the conversation contract and Connector contract for local and cloud spreadsheet behavior.

See Batch ambiguity confirmation and Recipes for grouped decisions, run/project scopes, and conflict handling.

To find out which files in a working directory are this period's inputs before any of them is read:

excel-ops scan-workdir ./september --period-start 2026-09-01 --period-end 2026-09-30

The scan is read-only, only touches directories you list, never reads a file that is still being written or synced, and never picks a winner among final.xlsx / final (1).xlsx / final-final.xlsx. See Working-directory scan; it is not yet wired into excel-ops deliver.

To make a periodic task idempotent, so that re-running it with nothing changed returns a no-op instead of redoing the work:

excel-ops deliver delivery-plan.json --run-state --task-key weekly-north

Inputs and templates are fingerprinted by content, so a renamed but identical file is not reprocessed, while a changed template, Recipe, or human review decision always triggers a new run — and a failed or interrupted run is never recorded as a completed one. See Idempotent execution.

For comparing workbook structures before append, join, or write-back, see Schema drift.

For system update checks, confirmed updates, and rollback, see Refresh.

Input format

{
  "source": "synthetic-patrol-sheet.png",
  "records": [
    {
      "location": "100 Example Avenue",
      "event_date": "2026-09-08",
      "identifier": "DEMO 123",
      "category": "synthetic example",
      "confidence": 0.97
    }
  ]
}

Image-to-JSON adapters are deliberately separated from workbook writing. A future adapter may use a local OCR engine or a vision model, but it must emit this same reviewable contract.

Product principles

  1. No silent guesses. Uncertainty is an output, not an implementation detail.
  2. Preserve provenance. Every written row points back to its source.
  3. Separate extraction from acceptance. A model may propose data; validation decides where it goes.
  4. Verify the delivery. Output counts and required fields are checked after writing.
  5. Make recurring work reproducible. Rules belong in configuration, not in somebody's memory.

Roadmap

The detailed, acceptance-test-driven roadmap lives in Roadmap issue #5:

  1. Phase 1 — Local XLSX: reliable local ingest, normalization, matching, review, template write-back, verification, and recipes.
  2. Phase 2 — Cloud connectors: the same workflow over synced folders, Google Sheets, Dropbox, Feishu, WPS, and later Microsoft Graph where demand justifies it.
  3. Phase 3 — Prompt-to-analysis: safe workbook joins, multi-tab delivery grouping, verified summaries/pivots, and repeatable automation.

Done so far, all in Phase 1: ingestion and layout detection (#1), type/locale inference (#24), schema-drift detection (#10), strict matching and dedup (#2), offline review packs (#18), safe template write-back (#3), independent delivery verification (#4), business-period resolution and date refresh (#16, #9), safe output naming (#17), formula integrity checks (#11), batch ambiguity confirmation and Recipes (#26), working-directory scan (#15), idempotent execution (#19), delivery manifests (#20), semantic number/currency formats (#23), verified XLSX/CSV/PDF delivery (#22), natural-language formula planning, safe application, and independent recalculation (#25), the integrated run_delivery(...) pipeline (#46), cross-platform CI (#50), and a JS/TS Agent orchestration layer over MCP that forwards to the same Python CLI without reimplementing it (#53), plus agent-callable delivery-plan preparation (#59).

Still open / not started: natural-language summaries and pivot tables (#6), conditional formatting (#7), batch name-tag/label generation (#8), version-diff audit packages (#12), workbook health checks and auditable auto-repair (#13), role packs (#14), unattended file-arrival triggers (#21), all of Phase 2's cloud connectors, and the rest of Phase 3.

Current capabilities

v0.5.1 is the current release. It is a maintainability release on top of v0.5.0 with no behavior change: the long delivery, workdir, CLI, PDF-verification, and template-writer code is split into named steps, and a CI size ratchet keeps new functions within 100 lines and modules within 800. Together with v0.5.0 it includes the complete local Phase 1 delivery foundation: business-period resolution, safe template write-back, independent verification, run_delivery(...), working-directory scan, whole-run idempotency, delivery Manifests, semantic number formats, cross-platform refresh/apply/rollback, the local Agent MCP server, verified XLSX/CSV/PDF delivery, and version-aware formula planning through independently recalculated delivery.

The MCP server exposes scan_workdir, prepare_delivery, plan_delivery, and run_delivery as structured tools over the same Python core (docs). Formula-mode delivery uses Microsoft Excel on Windows or LibreOffice for independent recalculation; if neither engine is available, delivery fails rather than claiming unverified success.

Merged modules, repository tests, a verified persisted file, and a tagged Release remain separate kinds of evidence. See the v0.5.1 Release and the v0.5.0 Release for the published scope and known gaps.

See the complete capability ledger, implementation status, safety boundaries, and linked issues/PRs.

Every cloud connector is still out of scope. Working-directory scan results are still an explicit planning input rather than being selected automatically by run_delivery. Semantic currency and precision rules are documented in the number-format policy guide.

License

MIT

About

Agent workflow for extracting, cleaning, matching, verifying, and delivering local or cloud spreadsheets

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages