Convert Excel to CSV, keeping leading zeros and dates
A club spreadsheet saved as one CSV per sheet, ZIP codes and dates intact.
A real run on 14 November 2026, on a Linux computer, using Claude Code with Opus, on a Claude plan. The waiting is sped up; it took 2 min 20 s in real time.
The short answer.
In Excel, File, Save As, CSV UTF-8 saves only the sheet you're on, so repeat for each sheet. Leading zeros that come from a number format (00417) can be lost, so make those columns Text first. Check the result in a text editor, because Excel hides the zeros again when it reopens a CSV. Stella (stella.sh) exports every sheet at once and checks each cell against the workbook.
Stella does this on Windows, Mac and Linux.
What happened.
Three CSV files in about 2¼ minutes. Checked afterwards against an answer key written before the run: Members and Payments each saved as CSV, all 64 members, member numbers and ZIP codes with their leading zeros, dates as real dates (not serial numbers), accented names right in UTF-8, addresses with commas kept in one field, every payment right, and the workbook unchanged.
The swim club and its members are fictitious, made for this run. The work is sped up 7×.
How Stella does it.
- Opens “Swim club members.xlsx” in Downloads: a Members sheet (64 members, numbers and ZIP codes shown with leading zeros), a Payments sheet with a total row, and a short Read me sheet
- Writes one CSV per sheet in UTF-8, so accented names come through, with addresses that contain commas quoted as one field
- Keeps member numbers and ZIP codes as the five digits you see (00402, 01776) and writes dates as 2022-09-18
- Leaves the blank row and the Total row out of Payments.csv so a website doesn't load the total as a payment, and checks the 40 payments still add up
- Saves them in a new folder next to the workbook, which is unchanged, and flags eight $1,250.00 payments that look like typos for $125.00
The prompt.
The swim club's membership spreadsheet is in my Downloads and the new membership website needs it as CSV files, one for each sheet. The member numbers and zip codes have to keep their leading zeros, and the dates need to come out as proper dates.
This is the exact prompt from the recording. If your files are somewhere else, say where.
Do it yourself.
Make zero-padded columns Text
If ZIP codes or member numbers show zeros only because of a number format, add a column with =TEXT(A2,"00000"), fill down, copy and Paste Values over the original. Now the zeros are part of the value.
Save each sheet
Click a sheet's tab, then File, Save As (or Save a Copy), and choose CSV UTF-8 (Comma delimited). Excel warns that only the active sheet is saved; that's expected. Repeat for every sheet under its own name.
Dates
A CSV stores dates as text in whatever format the cell shows. For a website, format date columns as yyyy-mm-dd first (Format Cells, Custom) so there's no doubt about day and month.
Check in a text editor
Open the CSV in Notepad or TextEdit, not Excel: Excel drops leading zeros again when it opens a CSV, even when they're in the file. Look for 00417 and a few dates.
Where it stops.
- A CSV holds values only: colours, formulas and several sheets in one file can't survive. Totals are written as their values, or left out if they'd be read as data.
- Opening the CSV in Excel again hides the leading zeros on screen, even though they are in the file.
- The workbook's content goes to the AI model you use in Stella as it checks the export; the files are written on your computer.
- Recorded on Linux with free Python spreadsheet tools. A Mac or Windows PC works the same way.
Questions.
How do I convert CSV back to Excel?
Open it with Data, From Text/CSV and set the zero-padded columns to Text in the preview, then save as .xlsx. For text reports, see convert a text file to Excel.
Why do my dates become numbers like 45231?
That's Excel's internal date number, written by tools that ignore the cell's format. Save from Excel itself, or ask for ISO dates.
Can I convert a Numbers file instead?
Yes: convert Numbers to Excel, then save as CSV.
Is Stella free for this?
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.
Can I control what Stella changes on my computer?
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.
- Microsoft: Import or export text (.txt or .csv) files
- Microsoft: Keeping leading zeros and large numbers
Checked against these sources on 14 November 2026.