
The short version
A step-by-step guide to automating spreadsheet cleanup with AI: deduplication, formatting, standardizing names and addresses, splitting columns, fixing dates, while protecting sensitive data through de-identification, privacy settings, tenant-boundary tools, and fully local models.
Summarize with AI
Editorial Disclosure & Affiliate Notice
This content is published for informational and educational purposes only. It is not intended as a substitute for professional, legal, financial, or medical advice. AIUnpacker is funded through clearly labeled sponsored articles and reviews, relevant paid link placements, and affiliate commissions where disclosed. Commercial partnerships help fund the free editorial library. Sponsored work is labeled, and a payment does not change the verdict.
- For educational purposes only. Nothing here should be taken as a guarantee, recommendation, or professional recommendation.
- AI-assisted editing. Drafts are produced with AI assistance and get a human pass before they go up.
- Opinions are our own. Also, we are not affiliated with most tools we cover unless explicitly stated.
- Information may be outdated. Verify pricing, features, and policies directly with the vendor.
- Last reviewed: . Published .
Read more on our About page, Terms and Editorial Policy.
Yes, you can automate spreadsheet cleanup with AI without exposing sensitive data, as long as you either de-identify the file before it leaves your machine or use an AI that runs entirely where the data already lives. Strip or replace the columns that identify people, keep the mapping key on your side, and tools like ChatGPT’s data analysis, Gemini in Google Sheets, and Copilot in Excel can handle deduplication, formatting fixes, standardizing names and addresses, splitting columns, and fixing dates on data they can’t trace back to anyone.
What spreadsheet cleanup with AI actually involves
Most messy-data jobs fall into a few buckets: deduplication (rows that are the same record with different spellings), formatting fixes, standardizing names and addresses into one style, splitting one packed column into several clean ones, and repairing dates stored as text. AI is good at these because they need judgment (“is Bob Smith the same person as Robert Smith?”) that rigid formulas lack.
The privacy risk is just as simple. The moment you upload a raw export, the AI provider holds a copy of personal data, under the GDPR, that copy counts as processing, and responsibility doesn’t evaporate because a chatbot did the typing. So every workflow below answers one question first: what does the provider actually receive?
Where your data actually goes: four approaches compared
| Approach | Where the data actually goes | Privacy level | Typical cost |
|---|---|---|---|
| De-identified file → ChatGPT data analysis | OpenAI’s cloud Python sandbox; no external web requests inside it | Medium: provider holds the file, but it no longer identifies anyone | Free tier, Plus $20/mo, Business $20-25 per seat |
| Gemini in Google Sheets | Google’s cloud, editing in place; Workspace content is not used to train Gemini models | Medium-High inside a Workspace tenant; weaker on a free personal Gmail | Workspace Business Standard from $14/user/mo; Google AI Pro $19.99/mo |
| Copilot in Excel | Microsoft cloud: workbook must sit on OneDrive/SharePoint with AutoSave on | High within a business tenant; the cloud-save requirement is the catch | Included with Microsoft 365 AI credits; $30/user/mo enterprise add-on |
| Local LLM (Ollama, LM Studio) on a cleaned export | Stays on your machine; nothing uploads | Highest | $0 plus your hardware |
| OpenRefine or offline Excel formulas | Stays on your machine | Highest | Free |
Notes on that table: ChatGPT’s data analysis runs Python in a sandbox that, per OpenAI’s help docs, “cannot make external web requests or API calls”. Gemini in Sheets edits your sheet in Google’s cloud, and Google states Workspace customer content is not used to train its generative AI models. Copilot in Excel has a catch: Microsoft’s FAQ says Copilot in Excel requires AutoSave, meaning the file must be saved to OneDrive: no local-only path exists.
Only the last two rows keep everything on your machine; everything else trades convenience for a provider’s boundary.
De-identify before anything leaves your machine
De-identification means removing or transforming anything that links a row back to a real person. Three techniques matter, and they stack:
- Column stripping. Delete columns the cleanup doesn’t need: names, emails, phone numbers, national IDs. If the AI is fixing dates, it doesn’t need a salary column.
- Pseudonymization. Replace identifiers with keys (Customer_001, Customer_002) and keep the lookup table in a file that never gets uploaded. Pseudonymization is reversible masking: its strength and, as you’ll see below, its legal weakness.
- Synthetic stand-ins. If the AI needs realistic text (standardizing address formats, say) swap real values for generated fakes. The Python Faker library and similar tools invent plausible names, emails, and addresses that match no real person.
Then comes the step people skip: indirect identifiers. A row with no name can still single someone out if the combination of values is rare enough.
99.98% of Americans could be correctly re-identified in any dataset using just 15 demographic attributes such as age and gender: the finding of a 2019 study in Nature Communications. “I removed the names” is not the same as “this is anonymous.”
Practical rule: generalize anything rare. Turn exact birth dates into age brackets, full ZIP codes into regions, tiny categories (“our only customer in Idaho”) into broader buckets. That is a working rule, not a legal threshold: it follows from the re-identification research.
The workflow: nine steps, with a privacy checkpoint at each stage
Here’s the end-to-end procedure for a customer list; each step ends with a concrete checkpoint.
- Inventory the sensitive columns. Scroll the file and list everything that identifies a person directly (names, emails, phones, IDs) or indirectly (rare job titles, exact locations, oversharing free-text notes). Checkpoint: you have a written list of columns that must not travel.
- Work on a copy. Duplicate the original and rename the copy “working.” Checkpoint: the untouched original sits somewhere safe until step 9.
- Strip or pseudonymize. Delete unneeded sensitive columns; for ones you’ll want back later, replace values with sequential keys and store the mapping locally. Checkpoint: the working file contains no values naming a real person, and the key is offline.
- Add synthetic stand-ins where the AI needs shape. Generate fake-but-plausible values so the model sees realistic text. Checkpoint: no fake value resembles someone you actually know.
- Hunt indirect identifiers. Generalize or remove rare combinations: exact ages, precise geocodes, tiny demographic buckets. Checkpoint: no single row would let you pick its human out of a crowd of a few thousand.
- Export a clean CSV. Save just the working sheet as CSV. OpenAI’s guide recommends plain-language headers in the first row, one record per row, no unrelated tables or empty separator rows. Checkpoint: the file contains exactly the columns on your allowed list: nothing else.
- Set the AI’s controls before uploading. On free or Plus ChatGPT, Settings → Data Controls → turn off “Improve the model for everyone”; consider a temporary chat. On consumer Gemini, review the Apps Activity (recently renamed “Keep Activity”) setting. On Business or Workspace, confirm you’re signed into the business account. Checkpoint: the setting is verified before the upload, not after.
- Run the cleanup in small, reviewable passes. Prompts that work: “Find near-duplicate rows despite spelling differences; list the pairs you’d merge and why before changing anything.” “Standardize every address to one consistent style.” “Convert every value in the Date column to ISO 8601.” Checkpoint: you reviewed a sample of each transformation and spot-checked about 20 rows before accepting the full run.
- Re-link, verify, and clean up. Rejoin the cleaned data to the mapping key locally, spot-check a few customers, then delete the uploaded file and the chat. OpenAI says deleted chats are removed from its systems within 30 days, and temporary chats stay out of your history and are deleted within 30 days regardless. Checkpoint: nothing in your AI account still references the dataset.
Caveat: temporary chats aren’t incognito. OpenAI may keep and review them up to 30 days for abuse monitoring. They’re excluded from history, memory, and training, not from retention.
What ChatGPT, Gemini in Sheets, and Copilot in Excel can do today
ChatGPT (data analysis). Upload.csv,.xls, or.xlsx and ChatGPT writes and runs Python on the file in an isolated environment, handling every task in this article from fuzzy dedup to date parsing. Per OpenAI’s File Uploads FAQ, as quoted in OpenAI’s community forum, uploads have a hard limit of 512 MB per file and roughly 2 million tokens of extractable text, with exact limits varying by plan. Free accounts get limited use; Plus is USD 20 per month; Business runs $20 per seat per month billed annually or $25 monthly with a two-seat minimum, per OpenAI’s Business overview, and OpenAI states business data is not used for training by default. Consumer accounts are the reverse: training applies unless you opt out.
Gemini in Google Sheets. Gemini sits in the sidebar and performs multi-step edits from a single prompt: Google’s support docs list cleaning data, applying conditional formatting, creating dropdowns, sorting and filtering, generating formulas, and building tables and charts. It “requires an eligible Google Workspace or Google AI plan,” works best on native Sheets files (convert.xlsx first), and on Workspace your content isn’t used to train Gemini models. Consumer differs: on the free Gemini app, Google notes that even with activity settings off, chats may still be processed in anonymized form to improve services.
Copilot in Excel. Copilot writes formulas, summarizes data, highlights values, and generates charts and pivots from prompts. The requirements: a qualifying Microsoft 365 plan and the workbook saved to OneDrive or SharePoint with AutoSave on. Microsoft 365 Copilot for business is listed at $30 per user per month (Microsoft, since January 2024); consumer Personal and Family plans include Copilot against a monthly AI-credit allowance, and Microsoft 365 Premium at $19.99 per month, launched October 2025, raises those limits. Easy to miss: Python in Excel also runs in Microsoft’s cloud, not on your PC, per Microsoft’s security page.
The docs don’t state how long Copilot’s or Gemini’s in-app prompts are retained. What all three state clearly is the training question, which matters more.
Local-only cleanup: Ollama, LM Studio, OpenRefine, and plain formulas
If the data must never leave the building, three routes run entirely on your hardware.
- Ollama is free, open-source software that runs open models (Llama, Mistral, Qwen, Gemma) locally and exposes a local API other tools can call; nothing uploads. A simple hardware rule: a model needs about as much RAM as its download size plus a little for context: an 8 GB machine handles small 7B-class models.
- LM Studio is the friendlier version: a desktop app with a model browser and built-in document chat, fully offline, per DataCamp’s tutorial.
- OpenRefine is the specialist: free, open-source, runs locally in your browser, and has been the go-to for interactive fuzzy-matching deduplication for years: reviewers still rate it the best free option for deep dedup work. Its clustering is deterministic and auditable, which AI merges are not.
A local 7B model won’t match GPT-class reasoning on gnarly standardization jobs, and you’ll do more work per row. Offline Excel is still excellent for big files: TEXTSPLIT, TEXTBEFORE, and TRIM handle splitting and standardizing, and Data → Remove Duplicates does exact dedup with no AI. Use formulas and OpenRefine for mechanical fixes; spend AI on de-identified data only for the judgment calls.
What regulators expect when you use AI on personal data
This is orientation, not legal advice. Get counsel for regulated data.
Under the GDPR, pseudonymized data is still personal data; only truly anonymous data falls outside the law. The test, from Recital 26, is whether identification is possible by means “reasonably likely to be used,” weighing cost, time, and available technology. The EDPB’s draft Guidelines 02/2026 on Anonymisation, adopted 7 July 2026 with consultation through 30 October 2026, sharpen this with criteria around singling out, linkability, and inference: claiming “anonymous” is getting harder, not easier.
On the US side, California’s CCPA defines deidentified data with three requirements: reasonable measures to prevent re-identification, a public commitment to keep it deidentified and not re-identify it, and contracts binding anyone you share it with to the same rules.
Two translations. Uploading de-identified data still makes you a controller under GDPR, so be ready to justify the processing. OpenAI offers a Data Processing Addendum for business customers, which matters for Article 28 (see this legal guide on ChatGPT and GDPR). And cloud AI on genuinely personal data is a call for your compliance function, not a personal convenience.
What to do next
- Customer PII, no budget: strip and pseudonymize locally, then use free ChatGPT data analysis with training opted out, or OpenRefine for the dedup pass.
- Already on Microsoft 365 or Google Workspace: Copilot in Excel or Gemini in Sheets keeps processing inside your tenant agreement: usually the cleanest cloud route.
- Regulated or contractually sensitive data: go local (Ollama or LM Studio on a cleaned export, or OpenRefine and formulas) and involve counsel first.
- Everyone: rehearse the nine steps on dummy data before touching the real file.
FAQ
Is it safe to upload a spreadsheet with customer data to ChatGPT?
It can be, if you de-identify the file first and control the training settings. On free and Plus plans, chats may be used for training unless you disable “Improve the model for everyone” under Data Controls; Business and Enterprise workspaces are excluded from training by default. Uploading raw personal data without those steps is a compliance decision, not a routine task.
What is the best AI tool for cleaning spreadsheets without sharing sensitive data?
A local setup. Ollama or LM Studio running an open model keeps everything on your machine, and OpenRefine handles fuzzy deduplication offline for free. If you want cloud quality, a tenant-boundary tool (Copilot in Excel or Gemini in Sheets on a business plan) keeps processing inside your existing agreement.
How do I de-identify a spreadsheet before uploading it to an AI tool?
List the identifying columns, delete the ones you don’t need, replace the ones you do with sequential keys like Customer_001 and store the mapping locally, then swap in synthetic values where the AI needs realistic text. Finally, generalize indirect identifiers such as exact ages or precise locations before exporting a clean CSV.
Does ChatGPT use my uploaded files for training?
On consumer plans, yes by default, unless you turn off “Improve the model for everyone” in Settings, then Data Controls. On ChatGPT Business, Enterprise, and Edu, OpenAI states business data is not used to train models by default. Either way, deleted chats are removed from OpenAI’s systems within about 30 days.
How much does it cost to clean a spreadsheet with AI?
Free routes exist: ChatGPT’s free tier with limits, OpenRefine, offline Excel formulas, and Ollama on your own hardware. Paid: ChatGPT Plus is $20 per month; Gemini comes via Google AI Pro at $19.99 per month or Workspace Business Standard from $14 per user per month; Copilot in Excel is included with Microsoft 365 AI credits or the $30 per user per month business add-on.
What are the main alternatives to cloud AI for spreadsheet cleanup?
OpenRefine for interactive fuzzy deduplication, offline Excel formulas (TEXTSPLIT, TRIM, Remove Duplicates), and local models through Ollama or LM Studio. All three keep data on your machine. They trade some capability (local models are weaker on nuanced standardization, formulas are rigid) for complete control over where data lives.
Which option is best for beginners?
De-identify a copy, then use ChatGPT’s data analysis: upload one CSV and describe the fix in plain English, no formulas required. Gemini in Sheets is just as easy if your file already lives in Google Drive and your plan includes it. Start with small, reversible passes and review the outputs each time.
What are the main limitations of AI spreadsheet cleanup?
Cloud tools require trusting a provider’s retention and training boundaries; Copilot in Excel only works on files saved to OneDrive; Gemini in Sheets needs a paid plan and native Sheets format; local models need decent RAM and reason less well. AI can also confidently merge records that aren’t duplicates: always review samples before accepting a full run.
Is pseudonymized data anonymous under GDPR?
No. Pseudonymization replaces identifiers with keys, but because re-identification is possible with the key, the data remains personal data under GDPR and stays in scope. Only data that no one can re-identify using reasonably likely means counts as anonymous, per Recital 26 and the EDPB’s 2026 draft guidelines on anonymisation.
How can I get better results when cleaning spreadsheets with AI?
Prepare the file the way OpenAI’s own guide suggests: one table, headers in the first row, one record per row, no empty separator rows. Run tasks one at a time, ask the AI to list proposed changes before applying them, and always spot-check. For deduplication, name your matching rules explicitly, such as matching email plus a fuzzy name.
Sources
- OpenAI Help Center: Data analysis with ChatGPT
- OpenAI Help Center: Data controls in ChatGPT
- OpenAI Help Center: Chat and file retention in ChatGPT
- OpenAI: Enterprise privacy
- OpenAI Help Center: ChatGPT Business overview
- OpenAI: ChatGPT pricing
- OpenAI Community: File upload limits (quoting the File Uploads FAQ)
- Google Support: Use Gemini in Google Sheets
- Google Workspace: Generative AI Privacy Hub
- Google Workspace. Pricing
- Google One: Google AI plans
- Google Support. Gemini Apps Privacy Hub
- Microsoft Support. FAQs about Copilot in Microsoft 365 subscriptions
- Microsoft Learn. Data, privacy, and security for Microsoft 365 Copilot
- Microsoft Support: Data security and Python in Excel
- Microsoft Support: Introducing Microsoft 365 Premium
- Microsoft Support: TEXTSPLIT function
- Microsoft Copilot Blog: Expanding Copilot to businesses of all sizes
- EDPB: Draft Guidelines 02/2026 on Anonymisation
- GDPR Recital 26: Principles of data protection
- California Privacy Protection Agency. CCPA statute (effective January 1, 2026)
- Rocher, Hendrickx and de Montjoye. Estimating the success of re-identifications in incomplete datasets, Nature Communications (2019)
- DataCamp: LM Studio tutorial
- Domo. Best data cleaning tools
- ActiveMind: ChatGPT and GDPR legal guide
Weekly digest
Get our weekly AI digest
The latest AI tools, prompts, and insights — short, useful, every week.
AIUnpacker Editorial
Articles are written for a specific question. Sponsored work is labeled.



