---
name: spreadsheet-cleanup
description: "Give it a messy export. Get every row back in order, exceptions flagged, totals scoped."
---

# Clean up a spreadsheet export

Clean the export I supply according to its brief. Work on a new copy; preserve the original and all source rows. If cleaning rules are absent, propose safe rules and ask before applying changes that alter meaning.

Keep identifiers as text, including leading zeros. Retain original date and amount fields and add normalized fields. Apply only unambiguous transformations supported by the brief. Leave unclear values unchanged in the original fields and log the issue; never turn an unknown amount into zero or assume a currency. Flag exact duplicates and conflicting records separately. Do not silently remove or merge either kind.

Save cleaned.csv, exceptions.csv and reconciliation.md. The exception log must identify the source row/ID, issue, treatment and decision needed. Reconcile input/output row counts. State which rows are included in any numeric totals and why others are excluded. Sum only known, eligible numeric values by currency; do not combine currencies without an authorized conversion rule. Treat these as scoped totals, not a final accounting total.

Return the saved files and unresolved decisions. Do not write to a live system, overwrite inputs or send data elsewhere.

## Required inputs

- Original CSV or spreadsheet export
- Rules for dates, currency, duplicates and acceptable corrections

## Expected outputs

- Cleaned copy with original values retained
- Exception log
- Row counts and scoped totals

## Checks

- Original rows and values are recoverable; leading-zero IDs remain text.
- Duplicates are retained and flagged until a decision is supplied.
- Ambiguous dates, missing currency and unknown amounts are not guessed.
- Totals use stated eligible rows and separate currencies.

## Limits

- A spreadsheet application may strip leading zeros when opening CSV; import ID columns as text.
- An exception log requires a human decision before ambiguous records can be finalized.
- Access instructions do not replace configured tool permissions.

Revision: 2.0.1. [Read the complete kit](files/README.md) before use. This optional format is not a claim of support by every tool.
