Excel to CSV Conversion: A Complete Guide to Clean Exports
By The Smart Data Converter Team · 11 min read ·
Exporting Excel to CSV is a daily task for analysts and developers — and a surprisingly easy one to get wrong. Leading zeros vanish, dates shift, accents break. This guide shows how to produce clean, reliable CSV exports that other tools and databases can read without complaint.
Why convert Excel to CSV?
- Database imports: Most import tools accept CSV, not
.xlsx. - Programmatic processing: CSV is trivial to parse in any language.
- Portability: CSV opens anywhere, with no Excel required.
- Smaller, simpler files: No formatting, formulas, or macros to carry along.
What you lose in the conversion (by design)
CSV is a single, flat, plain-text table. Converting from Excel therefore drops everything CSV can't hold:
- Multiple sheets (only one survives per file)
- Formulas (only the computed values remain)
- Formatting, colors, fonts, and merged cells
- Charts, images, and pivot tables
Remember: CSV keeps your data, not your presentation. Keep the original .xlsx as your source of truth.
Method 1: Export from Excel directly
- Open the workbook and select the sheet you want.
- Choose File → Save As (or Export).
- Pick CSV UTF-8 (Comma delimited) (*.csv) — the UTF-8 variant matters for accents and symbols.
- Save. Only the active sheet is exported; repeat for others.
Method 2: Convert in your browser
If you don't have Excel, or want to avoid its auto-formatting, upload the .xlsx to Smart Data Converter. It reads the spreadsheet locally, shows a preview, and exports clean CSV with your chosen delimiter — no files leave your device.
Method 3: Convert with Python
import pandas as pd
# Read a specific sheet
df = pd.read_excel("workbook.xlsx", sheet_name="Sheet1", dtype=str)
# dtype=str keeps leading zeros and prevents date auto-conversion
df.to_csv("output.csv", index=False, encoding="utf-8")
Reading with dtype=str is the trick that preserves identifiers like ZIP codes and SKUs.
The four problems that ruin Excel-to-CSV exports
1. Leading zeros disappear
Excel treats 00123 as the number 123. Format the column as Text before entry, or export with a tool that preserves strings. For ZIP codes and account numbers this is critical.
2. Dates get reformatted
A date can silently change to a locale-specific or serial-number format. Standardize on ISO format (YYYY-MM-DD) before exporting so the meaning is unambiguous everywhere.
3. Encoding garbles characters
Plain "CSV (Comma delimited)" in older Excel uses a legacy encoding that breaks é, ü, and non-Latin scripts. Always choose CSV UTF-8.
4. The delimiter fights your locale
In regions where the comma is the decimal mark, Excel exports with semicolons. If your downstream tool expects commas, either re-export or convert the delimiter explicitly. A converter that lets you pick the delimiter sidesteps this entirely.
Handling multiple sheets
Since CSV is one table per file, decide up front:
- One sheet only? Export just that sheet.
- Several sheets? Export each to its own CSV (e.g.
orders.csv,customers.csv). - Need them combined? Merge in Excel or with code first, then export once.
A pre-export checklist
- Removed blank rows and stray notes outside the table?
- Headers present and unique?
- Formulas converted to values (or you're fine exporting computed results)?
- ID columns formatted as text?
- Dates in ISO format?
- Exporting as UTF-8?
Frequently asked questions
Why does my CSV lose leading zeros?
Excel interprets such columns as numbers. Format them as text before saving, or use a converter that preserves string values.
How do I keep accented characters?
Export as CSV UTF-8 rather than the plain CSV option.
Can I convert Excel straight to JSON?
Yes — upload the file to Smart Data Converter and export JSON. Conceptually it's Excel → table → JSON; see the CSV to JSON guide for how the mapping works.
Clean Excel-to-CSV exports come down to three habits: save as UTF-8, protect IDs and dates from auto-formatting, and pick the right delimiter. Do those and your data will import cleanly every time.