Clean up a messy spreadsheet
Consistent names, dates, phone numbers and amounts in a new tab, with a count of each type of change.
- You start it: When you start it
What it does
The task
Open the sheet sheet url and the tab tab name. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to phone format, and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix.
- It works in Google Sheets, in the workspace you pick, and signs in with passwords from your Cuiar vault.
- It runs once, when you start it.
What you give it
| Blank | What to give | Example |
|---|---|---|
| sheet url | The Google Sheet to clean | https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit |
| tab name | The tab with the data | Customers export |
| phone format | The phone format you want | +44 20 7946 0000 (country code and spaces) |
What you get back
An example run with the example values above. Your run uses your own data.
Clean tab: 2,316 rows, 14 columns. The original tab did not change.
Changes:
- Extra spaces removed: 1,904 cells
- Dates converted to YYYY-MM-DD: 2,201 (from 4 different formats)
- Phone numbers changed to the +44 format: 1,877
- Amounts with GBP or commas converted to numbers: 640
- Names split: 2,316
Could not fix: 37 cells, marked in red (for example, the date 31/02/2025)
Run it in Cuiar
- 01
Open it
Click Use in Cuiar on this page. The side panel opens with the task in the composer.
- 02
Fill in 3 blanks
Type sheet url, tab name and phone format. Tab moves to the next blank.
- 03
Run it
Run sends it to the agent. Follow each step in the panel, and stop it at any time.
From the terminal
cuiar exec "Open the sheet https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit and the tab Customers export. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to +44 20 7946 0000 (country code and spaces), and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix."Run it from your AI agent
Claude Code, Codex, Cursor and other MCP clients reach Cuiar at https://mcp.cuiar.com/mcp. Add the server one time, then ask for the task in plain words, or call run_task yourself.
1. Add Cuiar to Claude Code
claude mcp add --transport http cuiar https://mcp.cuiar.com/mcp2. Ask your agent
Use the Cuiar tool run_task to run my "Clean up a messy spreadsheet" template with sheet url = https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit; tab name = Customers export; phone format = +44 20 7946 0000 (country code and spaces).Setup for other agents: AI agents.
The tool call
{
"name": "run_task",
"arguments": {
"task": "Open the sheet https://docs.google.com/spreadsheets/d/1Cl2rHn6Bz/edit and the tab Customers export. Copy the data to a new tab named Clean, and do not change the original tab. Remove extra spaces, fix the capital letters in names, convert dates to YYYY-MM-DD, phone numbers to +44 20 7946 0000 (country code and spaces), and amounts to numbers with no currency signs. Split full names into first and last name, and addresses into street, city and postcode. Add a tab named Changes with each type of change and its count. Mark each cell that you could not fix."
}
}Related templates
All data templatesData
Turn a list on a website into a sheet
Each item from each page, one row for each, with no duplicates.
You start it: When you start it- Any website
- Google Sheets
Data
List local businesses with their contacts
Name, address, phone, website, rating and e-mail for each business.
You start it: When you start it- Google Maps
- Google Sheets
Data
Export your order history
For stores with no export: each order in a sheet, with totals for each year.
You start it: When you start it- Any online store
- Google Sheets
Data
Pull tables from PDFs into a spreadsheet
Each matching table from your PDFs and scans in one sheet, with numbers as numbers and the page noted.
You start it: When you start it- Google Drive
- Google Sheets
Data
Find and merge duplicate rows in a sheet
Exact and near-duplicate rows grouped and merged into one row each, with a list of every merge.
You start it: When you start it- Google Sheets
Data
Build one table from several public statistics
Numbers from official sources in one sheet, with the same units, years and country codes.
You start it: When you start it- OOur World in Data
- Any government site
- Google Sheets