Step-by-step
📊 GitHub Copilot
GitHub
📘 Step-by-step 📘 GitHub · GitHub Copilot↗ GitHub Copilot · Official sitebeginner 🔄 Life & Business

Turn a Messy Spreadsheet Export into Clean Data with Copilot

Drop a messy CSV into GitHub Copilot and get back tidy dates, names, and columns you can actually use.

In short: You can paste a messy CSV — different date formats, mixed capitalization, extra columns — into GitHub Copilot's chat and ask it to clean the data. It will return a tidy version with consistent formatting, ready to save back as a CSV. You'll need a free GitHub account and a browser; the whole thing takes about ten minutes.

If you've ever opened a spreadsheet export and immediately wished someone would just fix it for you, this guide is for that moment. We're going to use GitHub Copilot, an AI assistant that lives inside GitHub, to clean up a typical messy export in plain English. No coding background needed — think of it as sending your spreadsheet to a very patient friend who loves organizing things.

💡 Tip: tap a step’s number when you finish it — a green tick appears and your browser remembers how far you got.

✅ Before you start
  • A free GitHub account (sign up at github.com if you don't have one).
  • A web browser — Chrome, Edge, Safari, or Firefox all work.
  • Your messy file in CSV format (CSV means "comma-separated values" — basically a spreadsheet saved as plain text; if you have an Excel file, see the note below).
  • About 10 minutes.
  • A free Copilot tier gives you a limited number of chat messages per month; if you hit the limit, paid plans are available — check the current price on Microsoft’s pricing page.

Note on Excel files: If your file is .xlsx (Excel's default format), open it in Excel or Google Sheets first and use File → Save As → CSV before starting. Copilot's chat works with text, not native spreadsheets.

1

Open GitHub Copilot Chat in your browser

Go to github.com and sign in. Look at the top-right corner of the page for a round profile icon — click it. A small dropdown menu appears; look for an option that says "Copilot" or "Try Copilot" and click it. This opens the Copilot chat panel, usually on the right side of the screen. If you don't see Copilot in the menu, look for a chat bubble icon in the top navigation bar instead. After clicking, you'll see a chat window with a text box at the bottom that says something like "Ask Copilot…" or "Message Copilot…".

💬 Exampletype a test message like "Hi" to confirm it works.

You'll know it worked when Copilot replies with a friendly greeting in the chat panel.

2

Open your messy CSV and copy the contents

On your computer, find the CSV file you want to clean. Right-click the file (on Windows) or control-click it (on Mac) and choose "Open With" → Notepad (Windows) or TextEdit (Mac). A plain text window opens showing rows of comma-separated data — it looks a bit ugly, but that's normal. Press Ctrl+A (Windows) or Cmd+A (Mac) to select everything, then Ctrl+C or Cmd+C to copy. The entire contents of your file are now on your clipboard (the clipboard is your computer's temporary copy-paste storage).

💬 Examplea typical messy row might look like `john smith,01/05/2024,yes,USA` — that's what we're going to clean.

You'll know it worked when you can see highlighted text in the text editor and your cursor briefly changes to indicate a copy action.

3

Paste your data into Copilot and describe the mess

Click back into the Copilot chat box. Paste your copied data with Ctrl+V (Windows) or Cmd+V (Mac). The CSV text appears inside the chat message box — it may look cramped, but Copilot can read it. Now, on a new line below the pasted data, type a short, clear instruction describing what you want fixed. Be specific about the problems you see — mixed date formats, inconsistent capitalization, extra columns, whatever applies to your file. If the data is small (under about 50 rows), it often works to paste and ask in one message. For larger files, you'll get better results by asking Copilot to write code that cleans the data instead (see Step 5).

💬 Exampleafter pasting, type — *"Clean this CSV. Make all dates YYYY-MM-DD, capitalize names properly, remove the 'country' column, and standardize 'yes/no' to TRUE/FALSE."*

You'll know it worked when Copilot responds with a cleaned version of your data, formatted as a neat table or code block.

4

Review the cleaned output and ask for fixes

Copilot usually returns the cleaned data inside a code block — that's a gray box with the data inside, framed by lines like csv at the top and at the bottom. Read through it carefully. AI assistants sometimes make small mistakes, especially with unusual date formats or unusual names. If something looks off — say all your dates came out wrong, or a name got changed — just reply in the chat with the specific problem. Copilot will try again. Think of this like editing a document with a helpful coworker: you check their work, and you ask for changes when needed.

💬 Exampletype — *"The dates are now wrong. January 5 became 2024-05-01 instead of 2024-01-05. The original format was DD/MM/YYYY."*

You'll know it worked when the new response shows your correction applied to every row.

5

For larger files, ask Copilot to write you a cleaning script

If your CSV has more than about 50 rows or several problems at once, copying and pasting gets awkward. Instead, paste just the first 5–10 rows as a sample and ask Copilot to write a small program that cleans the whole file for you. Copilot will return code in Python (a popular programming language — but you don't need to know Python to use it) along with instructions. You'll copy the code, run it on your computer, and it will produce a new clean file. This sounds technical, but it's actually the easier path for bigger files — and you can always paste small bits back into chat to ask follow-up questions.

💬 Exampletype — *"Here's a sample of my CSV. Write a Python script that cleans the full file the same way and saves the result as clean_data.csv."*

You'll know it worked when Copilot gives you a complete code block you can save as a .py file and run.

6

Save the cleaned data back to a file

For small files where you got a cleaned table in chat, click the copy icon in the top-right corner of the code block (it usually looks like two overlapping squares). Open a new file in Notepad or TextEdit, paste the cleaned data in, and save it with a new name like clean_data.csv — keeping the .csv extension is important so other programs recognize it as a spreadsheet. For the script approach from Step 5, run the Python file once and it will create the cleaned file automatically; the script's output line will tell you where it saved. You can now open clean_data.csv in Excel, Google Sheets, or any spreadsheet program.

💬 Examplename the new file `customers_clean_2024.csv` so it's easy to find later.

You'll know it worked when the new file opens cleanly in a spreadsheet program with consistent formatting across every row.

⚠️ Common mistakes
  • Forgetting to check the output. AI assistants can quietly change a name or misread a date format. Always skim the cleaned data before saving — it takes 30 seconds and saves real headaches.
  • Leaving dates ambiguous. "01/05/2024" could mean January 5 or May 1 depending on the country. If your original data is ambiguous, tell Copilot explicitly: "the original dates are DD/MM/YYYY" — otherwise it will guess.
  • Trying to paste a huge file directly into chat. Most chat windows have a character limit, and very large pastes often get truncated (cut off partway through). For files over a few hundred rows, use the script approach in Step 5 instead.
🚀 Try it now

Open any small CSV on your computer (or export one from a spreadsheet app), and paste its first few rows into Copilot Chat with the instruction: "Clean this data and show it back to me as a table." That's it — your first cleaned spreadsheet in under two minutes.

❓ Quick questions

How long does this take?

About 7 minutes — the guide has 6 steps, and you can tick each one off as you go.

Which tool do I need?

This guide uses GitHub GitHub Copilot — but the approach works very similarly in other AI assistants.

Do I need to prepare anything?
  • A free GitHub account (sign up at github.com if you don't have one).
  • A web browser — Chrome, Edge, Safari, or Firefox all work.
  • Your messy file in CSV format (CSV means "comma-separated values" — basically a spreadsheet saved as plain text; if you have an Excel file, see the note below).
  • About 10 minutes.
  • A free Copilot tier gives you a limited number of chat messages per month; if you hit the limit, paid plans are available — check the current price on Microsoft’s pricing page.

Note on Excel files: If your file is .xlsx (Excel's default format), open it in Excel or Google Sheets first and use File → Save As → CSV before starting. Copilot's chat works with text, not native spreadsheets.

What mistakes should I avoid?
  • Forgetting to check the output. AI assistants can quietly change a name or misread a date format. Always skim the cleaned data before saving — it takes 30 seconds and saves real headaches.
  • Leaving dates ambiguous. "01/05/2024" could mean January 5 or May 1 depending on the country. If your original data is ambiguous, tell Copilot explicitly: "the original dates are DD/MM/YYYY" — otherwise it will guess.
  • Trying to paste a huge file directly into chat. Most chat windows have a character limit, and very large pastes often get truncated (cut off partway through). For files over a few hundred rows, use the script approach in Step 5 instead.

Keep reading

Was this helpful?

✦ Original step-by-step guide by AI World HQ's AI editorial team. Written in plain language, reviewed for accuracy.

← Back to all stories