How to Convert Excel to CSV (Preserve Data, Handle Encoding, Batch Export)
Table of Contents
- TL;DR — Three Ways to Export CSV
- What Gets Lost in the Conversion
- Method 1: Excel Save As
- Method 2: Google Sheets Export
- Method 3: Browser-Based Converter
- Method 4: Python pandas
- Encoding Issues: UTF-8 vs UTF-8 BOM vs CP1252
- Handling Multi-Sheet Workbooks
- CSV vs XLSX: What to Use When
- Common Problems and Fixes
- Frequently Asked Questions
Your data lives in Excel. The database you are loading it into expects CSV. The AI tool you are using to analyze it prefers plain text. The API you are calling needs comma-separated values. This happens dozens of times a day in data work, and the conversion looks trivial — until a column of phone numbers loses its leading zeros, a date column becomes ambiguous between US and European formats, or an entire CSV file displays as question marks because of an encoding mismatch. This guide covers not just how to convert, but how to do it without the common pitfalls.
1. TL;DR — Three Ways to Export CSV
Direct answer: To convert Excel to CSV in Excel: open the file → File → Save As → choose "CSV UTF-8 (Comma delimited)" from the format dropdown → Save. Each sheet must be exported separately. Formulas are automatically converted to their calculated values. UTF-8 encoding prevents character corruption for files with international characters.
For bulk conversion or files you cannot open in Excel, a browser-based converter like Convertlo XLSX to CSV handles the export without requiring Excel to be installed — running entirely in your browser.
2. What Gets Lost in the Conversion
CSV is a plain-text format — it stores rows and columns of values, nothing else. The gap between what XLSX supports and what CSV can represent is significant. Understanding exactly what is lost helps you decide whether CSV is appropriate and what to keep in the XLSX as the source of truth.
| Feature | Saved in CSV? | What happens |
|---|---|---|
| Cell values (text, numbers) | Yes | Preserved exactly as displayed |
| Formulas | Values only | Saved as the calculated result, not the formula |
| Multiple sheets | No | Only the active sheet is exported |
| Formatting (bold, colors, fonts) | No | All visual formatting is stripped |
| Charts and images | No | Charts and embedded images are discarded |
| Merged cells | Partial | Value appears in top-left cell; other cells are empty |
| Macros and VBA | No | All code is discarded — CSV is static data only |
| Data validation | No | Dropdown lists and constraints are not saved |
| Pivot tables | Values only | Current displayed values saved; pivot structure lost |
Formulas becoming values is usually exactly what you want when exporting for a database or API — the downstream system needs the number, not the formula. But it means the CSV is a snapshot at export time. If the underlying data changes, you need to re-export. Keep the XLSX as the live working file; treat the CSV as a read-only export for a specific point in time.
3. Method 1: Excel Save As
The native Excel export is the fastest method for single sheets and requires no additional software.
CSV saves only the active sheet. If you have multiple sheets, click the one you need before starting the export. Repeat the entire process for each additional sheet.
Open the Save As dialog. Navigate to your target folder. The current filename is pre-filled — you can change it to something descriptive like sales-2026-q1.csv.
This is critical. There are multiple CSV options in the dropdown. Select specifically "CSV UTF-8 (Comma delimited) (.csv)" — not plain "CSV (Comma delimited)" which uses legacy encoding. UTF-8 handles all languages and special characters correctly.
Excel shows a warning: "This file may contain features that are not compatible with CSV." This refers to formulas, formatting, and multiple sheets. Click Yes / Keep Current Format. Your data values are saved correctly.
Do not use "CSV (Comma delimited)" — the non-UTF-8 option. This saves in your system's legacy code page (CP1252 on Windows, which corrupts accented characters and any non-Latin text when opened in tools that expect UTF-8). Always choose the explicit "CSV UTF-8" option.
4. Method 2: Google Sheets Export
Google Sheets is useful when you need to convert an XLSX file but do not have Excel installed, or when you want to quickly inspect the file before exporting.
Drag the file to drive.google.com or click New → File upload. The file appears in Drive with the Excel icon.
Double-click the file to open it, or right-click → Open with → Google Sheets. Google Sheets opens the XLSX and converts it automatically. Review the data to confirm it imported correctly — check that dates, numbers, and special characters look right.
This exports only the active sheet as CSV. Google Sheets always exports as UTF-8, so character encoding is handled automatically. Repeat for each sheet by clicking the sheet tab and downloading again.
When to use Google Sheets over Excel:
- You do not have Excel installed and need a free desktop option
- You want to share the conversion process with someone who does not have Excel
- You need to do light data cleanup before exporting (search and replace, column reordering)
- You want to inspect the file in a different application to catch any import issues before the final export
5. Method 3: Browser-Based Converter
Convertlo's XLSX to CSV converter runs entirely in your browser using JavaScript. Nothing is uploaded to a server — your file stays on your device. This is the right choice when you need to convert quickly without opening Excel or Google Sheets, or when working with files that should not leave your computer.
Go to convertlo.pro/xlsx-to-csv.html. No account required. The page loads in a few seconds.
Drag the Excel file onto the drop zone, or click to browse and select it. The converter reads the file entirely in your browser memory — it is never sent anywhere.
If the workbook has multiple sheets, the converter shows a list of available sheets. Select the one you want to export. Export each sheet separately if you need all of them.
Click Convert / Download. The output file is UTF-8 encoded CSV, ready to use in any tool.
Convert Excel to CSV — Free, In Browser
No upload, no signup, no file size limit. Your file never leaves your device.
6. Method 4: Python pandas
Python with the pandas library is the right tool when you need to convert multiple files, automate the conversion as part of a larger pipeline, or need to transform the data during export (rename columns, filter rows, change date formats).
Basic Single-File Conversion
import pandas as pd
# Read the first sheet (default)
df = pd.read_excel('data.xlsx')
# Export to CSV with UTF-8 encoding, no index column
df.to_csv('data.csv', index=False, encoding='utf-8')
Exporting All Sheets to Separate CSV Files
import pandas as pd
# Open the workbook
xl = pd.ExcelFile('workbook.xlsx')
# Export each sheet to a separate CSV file
for sheet_name in xl.sheet_names:
df = xl.parse(sheet_name)
# Clean the sheet name for use as a filename
filename = sheet_name.replace(' ', '_').replace('/', '-') + '.csv'
df.to_csv(filename, index=False, encoding='utf-8')
print(f"Exported: {filename} ({len(df)} rows)")
Batch Converting Multiple XLSX Files
import pandas as pd
import glob
import os
# Find all XLSX files in the current directory
xlsx_files = glob.glob('*.xlsx')
for xlsx_path in xlsx_files:
# Create output filename
csv_path = os.path.splitext(xlsx_path)[0] + '.csv'
# Read and export first sheet
df = pd.read_excel(xlsx_path)
df.to_csv(csv_path, index=False, encoding='utf-8')
print(f"{xlsx_path} ({len(df)} rows) -> {csv_path}")
Fixing Date Format During Export
import pandas as pd
df = pd.read_excel('sales.xlsx')
# Convert date columns to ISO 8601 format (YYYY-MM-DD)
# This prevents ambiguity between US and European date formats
date_columns = ['order_date', 'ship_date', 'invoice_date']
for col in date_columns:
if col in df.columns:
df[col] = pd.to_datetime(df[col]).dt.strftime('%Y-%m-%d')
df.to_csv('sales.csv', index=False, encoding='utf-8')
Install pandas if you don't have it: pip install pandas openpyxl. The openpyxl package is required for pandas to read XLSX files.
7. Encoding Issues: UTF-8 vs UTF-8 BOM vs CP1252
Encoding problems are the most common source of "corrupted" CSV files. The symptom: you open a CSV and see question marks, boxes, or scrambled characters where accented letters (é, ü, ö), French characters (ç, à), or non-Latin scripts should be. Understanding why this happens makes it easy to fix.
Why Encoding Corruption Happens
When a CSV file is saved, each character is stored as a number. Different encoding systems map different numbers to different characters. The most common encodings:
- UTF-8 — the universal standard. Handles all languages. Every character above basic ASCII uses 2-4 bytes. The correct choice for any new CSV file.
- UTF-8 BOM (UTF-8-SIG) — UTF-8 with a Byte Order Mark at the start of the file. Some older Windows tools (including older versions of Excel) add this automatically. Most modern tools handle it correctly, but some tools or parsers choke on the BOM. Use regular UTF-8 unless a specific tool requires BOM.
- CP1252 (Windows-1252) — the legacy Windows encoding for Western European languages. Handles accented Latin characters (é, ü, ö, etc.) but corrupts anything outside Western European scripts. This is what Windows Excel uses when you choose plain "CSV" rather than "CSV UTF-8".
- Latin-1 (ISO-8859-1) — similar to CP1252, slightly different mappings for a small range of characters. Legacy Unix encoding.
Fixing an Encoding Problem in Python
import pandas as pd
# If your CSV was saved in CP1252 (Windows legacy) and shows garbled characters
df = pd.read_csv('corrupted.csv', encoding='cp1252')
# Re-save as UTF-8
df.to_csv('fixed.csv', index=False, encoding='utf-8')
Checking Encoding of an Unknown CSV File
import chardet
with open('mystery.csv', 'rb') as f:
result = chardet.detect(f.read())
print(result) # {'encoding': 'CP1252', 'confidence': 0.73}
Install chardet with pip install chardet. The confidence score indicates how certain the detection is — above 0.9 is reliable, below 0.7 is a guess.
8. Handling Multi-Sheet Workbooks
Excel workbooks routinely contain multiple sheets — monthly data across 12 tabs, different data categories, summary and detail sheets. CSV is a single-table format, so exporting a multi-sheet workbook to CSV always requires multiple CSV files.
Strategy for Naming Multiple CSV Files
The naming convention matters because the downstream system will need to identify which data is which. Three common approaches:
- Sheet name as filename:
january.csv,february.csv,march.csv— clear and self-documenting - Workbook prefix + sheet name:
sales-2026-january.csv— useful when multiple workbooks produce CSV files that go to the same folder - Positional naming:
data-01.csv,data-02.csv— avoid this; it loses the meaning of the sheet names
Which Sheets to Export
Not every sheet in a workbook contains data that needs to be exported. Common sheets to skip:
- Summary/Dashboard sheets — these are usually formula-driven views of the underlying data; export the source sheets instead
- Lookup tables — if the downstream system has its own lookup data, these may be redundant
- Documentation sheets — README-style sheets explaining the workbook structure are useful for humans, not for data processing
- Chart-only sheets — charts are entirely discarded in CSV; these sheets produce empty CSV files
When in doubt, export all data sheets and let the downstream system use what it needs. An extra CSV file that is not consumed causes no harm. A missing CSV file causes import failures.
9. CSV vs XLSX: What to Use When
Use CSV for:
AI tools, databases, APIs, command-line processing, Python/R data analysis, any system that reads files programmatically. CSV is universally readable — no library needed.
Use XLSX for:
Working files with formulas, charts, multiple related sheets, formatted reports for human reading, files shared with Excel users who need the full spreadsheet functionality.
Keep both when:
You have an ongoing data process. XLSX is the source of truth (editable, formula-driven). CSV is the export format for data consumers. The same process — maintain one, distribute the other.
| Use case | Best format | Why |
|---|---|---|
| Import to PostgreSQL / MySQL | CSV | COPY/LOAD DATA INFILE commands use CSV directly |
| Python pandas analysis | CSV | pd.read_csv() is faster and requires no extra library |
| Upload to ChatGPT / Claude / Gemini | CSV | AI tools parse CSV as plain text — fewer tokens, cleaner extraction than XLSX |
| Mailchimp / CRM import | CSV | Most CRMs accept only CSV for contact imports |
| Sharing with Excel users for editing | XLSX | Formulas, formatting, and multiple sheets are preserved |
| Financial model with formula dependencies | XLSX | Formula relationships are the value — do not destroy them with CSV |
| Data backup / archiving | Both | XLSX for the formulas and structure, CSV for the values snapshot |
10. Common Problems and Fixes
Problem: Phone numbers and zip codes lose leading zeros
A phone number stored as 07911123456 in Excel exports as 7911123456 in CSV, dropping the leading zero. This happens because Excel stores it as a number, and numbers do not have leading zeros. The fix: before exporting, format the column as Text in Excel (right-click the column → Format Cells → Text). Or, after exporting, import to your database with that column typed as VARCHAR rather than INTEGER.
Problem: Dates are ambiguous (01/05/2026 — May 1 or January 5?)
Date format ambiguity is a persistent problem when CSV files cross regional boundaries. Fix before exporting: in Excel, select the date column, press Ctrl+1, choose Custom format, and type yyyy-mm-dd. ISO 8601 format is unambiguous in every locale and reads correctly in all programming languages and databases.
Problem: Commas in data values break CSV parsing
A cell containing the value London, UK will break naive CSV parsers that split on every comma. Excel correctly wraps such cells in double quotes when exporting: "London, UK". Most parsers handle RFC 4180 quoting correctly, but some legacy tools do not. If you are using a strict parser, consider replacing commas within values before exporting, or switch to TSV (tab-separated values) as the delimiter when commas are common in your data.
# Python: export as TSV instead of CSV when commas appear in values
df.to_csv('data.tsv', index=False, encoding='utf-8', sep='\t')
Problem: CSV opens in Excel with all data in one column
This happens when Excel's auto-detection picks the wrong delimiter. Instead of double-clicking the file, import it deliberately: in a blank Excel sheet, go to Data → From Text/CSV → select the file → in the import wizard, set encoding to UTF-8 and delimiter to comma. In European locales where semicolons are the default delimiter, select semicolon instead.
Problem: Line breaks inside cell values create extra rows in CSV
If a cell contains a newline character (Alt+Enter in Excel), the CSV export wraps the cell content in quotes and the newline is part of the value. RFC 4180-compliant parsers handle this correctly, but simple line-by-line parsers break. Check for and remove embedded newlines before exporting:
import pandas as pd
df = pd.read_excel('data.xlsx')
# Remove line breaks from all string columns
df = df.applymap(lambda x: x.replace('\n', ' ').replace('\r', '') if isinstance(x, str) else x)
df.to_csv('clean.csv', index=False, encoding='utf-8')
Problem: Numbers formatted as text export with apostrophes or quotes
Some Excel files contain numbers that were entered with a leading apostrophe to force text storage (a common trick to preserve leading zeros). These export to CSV with the apostrophe preserved, which breaks numeric parsing downstream. Fix: in Excel, select the column, Data → Text to Columns → Finish (no changes) to reparse and remove the text flag, then re-export.
11. Frequently Asked Questions
How do I convert Excel to CSV without losing data?
Why is my CSV file corrupted after export?
How do I export multiple sheets to CSV?
Does CSV support multiple sheets?
What encoding should I use for CSV?
How do I convert CSV back to Excel?
Can I convert Excel to CSV without Excel installed?
What is the difference between CSV and XLSX?
The Excel-to-CSV conversion looks simple but has several traps that catch people regularly: encoding selection, one-sheet-at-a-time exports, leading zeros in numeric fields, and date format ambiguity. Each trap has a straightforward fix once you know where to look. For the vast majority of use cases, "File → Save As → CSV UTF-8" solves it in three clicks. For automation or bulk work, the Python pandas approach handles any volume reliably.