Skip to content

Operations · For your bots

Spreadsheet cleanup

Clean a messy spreadsheet or CSV (headers, types, duplicates, blanks, inconsistent values) into a tidy copy, with a log of every change.

In Lobstack: Skills › Library › Add

Download Lobstack

When to use it

An export is too messy to sort, filter or import: merged headers, mixed date formats, duplicate rows, "N/A" in number columns.

What your bot will do

  1. 01

    Never edit the original. Work on a copy named with a -clean suffix.

  2. 02

    Profile before changing anything, and report it: rows and columns, empty columns, each column's apparent type and how many values do not fit it, likely duplicates.

  3. 03

    Fix structure: one header row, lower_snake_case names, one value per cell, no totals or note rows inside the data.

  4. 04

    Fix values: trim whitespace, ISO dates (YYYY-MM-DD), numbers without currency signs or thousands separators, one spelling per category ("NY", "New York" and "new york" become one).

  5. 05

    Leave blanks empty, not zero. Missing and zero are different facts.

  6. 06

    Remove exact duplicate rows. List near-duplicates — same email, different name — and ask; never merge on a guess.

  7. 07

    Keep a change log: each rule applied and how many cells it touched, plus what is still unresolved.

  8. 08

    Deliver the clean file and the log, and say in one line whether it is now safe to import or analyse.

If more than a tenth of a column will not parse, stop and ask what the column means before converting it.

The file

spreadsheet-cleanup/SKILL.md35 lines
---name: spreadsheet-cleanupdescription: "Clean a messy spreadsheet or CSV (headers, types, duplicates, blanks, inconsistent values) into a tidy copy, with a log of every change."metadata:  title: "Spreadsheet cleanup"  category: operations  tags: [data, csv]--- ## When to use this An export is too messy to sort, filter or import: merged headers, mixed dateformats, duplicate rows, "N/A" in number columns. ## How 1. Never edit the original. Work on a copy named with a -clean suffix.2. Profile before changing anything, and report it: rows and columns, empty   columns, each column's apparent type and how many values do not fit it,   likely duplicates.3. Fix structure: one header row, lower_snake_case names, one value per cell, no   totals or note rows inside the data.4. Fix values: trim whitespace, ISO dates (YYYY-MM-DD), numbers without currency   signs or thousands separators, one spelling per category ("NY", "New York"   and "new york" become one).5. Leave blanks empty, not zero. Missing and zero are different facts.6. Remove exact duplicate rows. List near-duplicates -- same email, different   name -- and ask; never merge on a guess.7. Keep a change log: each rule applied and how many cells it touched, plus what   is still unresolved.8. Deliver the clean file and the log, and say in one line whether it is now   safe to import or analyse. If more than a tenth of a column will not parse, stop and ask what the columnmeans before converting it.

Get Lobstack.