How to Convert XLSX to CSV: A Practical Guide
Learn how to convert XLSX files to CSV across Excel, Google Sheets, and scripts. This practical guide covers steps, tips, and common pitfalls for clean data export.

By the end of this guide, you will be able to convert any XLSX workbook to CSV using Excel, Google Sheets, or a small script. The steps cover exporting with correct delimiter and encoding, handling multiple sheets, and validating the resulting CSV. This approach keeps data integrity intact and avoids common export issues. According to MyDataTables, CSV is ideal for interoperable data sharing across teams and tools.
Why CSV is the go-to format for data exchange
CSV, or comma-separated values, is a plain-text format that preserves data without relying on proprietary software. For data analysts, developers, and business users who rely on reliable import/export, CSV offers portability across platforms and programming languages. When you convert an XLSX workbook to CSV, you strip spreadsheet-specific features (formulas, formatting, and multiple sheets) to focus on raw data rows and columns. MyDataTables' research into CSV workflows shows that teams favor CSV for data pipelines, sharing datasets via email, and loading data into databases or BI tools. Keeping the conversion simple reduces compatibility issues and makes automation easier. Expect to lose formatting and calculations during this step, but you gain broad interoperability and easier version control. Encoding is important; UTF-8 is widely supported, which helps preserve non-English characters.
CSV vs XLSX: key differences you should know
XLSX stores data with formatting, formulas, and multiple sheets; CSV stores plain rows. This means XLSX can display rich visuals but is not ideal for cross-platform data exchange. When you convert, you should decide whether you need to preserve a single worksheet, or export every sheet into separate CSV files. Encoding matters: UTF-8 is widely supported, while ANSI encodings can cause garbles with non-English text. Delimiters also matter: commas are standard, but semicolon or tab-delimited CSV may be required for specific locales or tools. Understanding these differences helps you avoid surprises in downstream systems and ensures your data remains clean after export.
What to prepare before exporting
Before you start, perform a quick data sanity check. Make sure there are no hidden characters in headers, and consider removing merged cells that can complicate exports. Decide if you want a single CSV or one per sheet, and note the target encoding and delimiter required by downstream systems. If you expect non-English data or special symbols, plan to use UTF-8 encoding and 8-bit safe quoting. Gather the tools you’ll use (Excel, Google Sheets, or a scripting environment) and establish a backup of the original XLSX in case you need to revert.
Method: Export in Microsoft Excel
To export from Excel, open the workbook and select the sheet you want to convert. Go to File > Save As, select the location, and choose the CSV format. If you have Excel 2019/365 or newer, choose the CSV UTF-8 (Comma delimited) option to preserve a wide range of characters. Click Save. Excel will warn that only the active sheet is saved in CSV; if you need other sheets, repeat the process for each one. After saving, inspect the file to ensure headers and data align correctly and that there are no unintended empty rows.
Method: Export in Google Sheets
In Google Sheets, open the sheet you want to export and go to File > Download > Comma-separated values (.csv, current sheet). This exports only the active sheet, so you must repeat the process for other sheets if needed. Ensure you choose UTF-8 encoding if prompted, and confirm the resulting file opens correctly in a text editor. If your data contains quotes or commas inside fields, the CSV will handle quoting automatically, but it’s worth a quick check to ensure readability.
Programmatic conversion with Python (pandas)
For automation or batch processing, Python with pandas offers a robust approach. Install pandas and openpyxl, then run a small script to read an Excel file and write CSV files. Here is a minimal example:
import pandas as pd
# Read an Excel file with multiple sheets
xls = pd.ExcelFile('input.xlsx')
# Write each sheet to its own CSV file
for sheet in xls.sheet_names:
df = pd.read_excel(xls, sheet_name=sheet)
df.to_csv(f'{sheet}.csv', index=False, encoding='utf-8')This method preserves data values, handles encoding, and scales well for large datasets. It also supports exporting all sheets in one run, which is ideal for data pipelines and automated ETL processes.
Handling multiple sheets and large files
If your workbook contains several sheets with different data shapes, exporting each sheet separately as a CSV ensures clarity and avoids column misalignment. For very large files, consider writing chunks of the data or using pandas’ iterator options to minimize memory usage. When file size becomes a concern, you can split output into multiple smaller CSVs or compress them for transport. Always confirm the presence of all required columns in the resulting files and validate a sample of rows to catch anomalies early.
Encoding and delimiter choices that matter
UTF-8 encoding is the safest default, especially if your data includes non-English characters or symbols. Some downstream tools require semicolon-delimited CSV files due to locale settings; in such cases, adjust the delimiter during export (or post-process with a simple script). If your data stores quotes, ensure the export tool quotes fields correctly to avoid breaking the CSV structure. A small test export with a handful of rows can save hours of debugging later.
Validate the CSV: quick checks and sanity tests
After exporting, perform quick checks: open the CSV in a text editor to verify that headers align with data rows, confirm no unintended line breaks within fields, and ensure the file uses the expected encoding and delimiter. A simple validation step is to count lines and compare against the expected number of rows per sheet. You can also load the CSV back into a data tool (pandas, R, or SQL) to confirm that the data types and values are preserved.
Common pitfalls and how to avoid them
Common issues include losing formulas (CSV stores data values only), mismatched encoding, and merged cells causing misaligned columns. To avoid these, export the raw data from the appropriate sheet, choose UTF-8 encoding, and perform post-export checks. When working with locale-specific decimals or thousands separators, export with the correct delimiter or perform a locale-aware transformation in your script or tool. Planning ahead reduces rework and data quality problems.
Tools & Materials
- Computer with Excel or Google Sheets access(Excel 2019/365 recommended for UTF-8 options; Google Sheets works in browser)
- Python (optional for scripting)(Install pandas and openpyxl for Excel support)
- Text editor or CSV viewer(Helpful for quick spot checks of encoding and delimiters)
- UTF-8 aware CSV validator(Ensures non-English characters are preserved)
- Backup copy of original XLSX(Always keep a copy before exporting)
Steps
Estimated time: 30-60 minutes
- 1
Decide the export method
Choose whether to export via Excel, Google Sheets, or a small script based on the workbook's size, complexity, and your automation needs.
Tip: If you plan to repeat this task, scripting offers consistency and speed. - 2
Open the workbook and inspect data
Review headers for accuracy, check for merged cells, and note which sheets contain the data you need in CSV format.
Tip: Note any characters that may require escaping during export. - 3
Choose encoding and delimiter
Decide between UTF-8 (recommended) and the appropriate delimiter (comma by default, semicolon for certain locales, or tab for TSV).
Tip: UTF-8 with quotes around fields prevents misinterpretation of commas inside data. - 4
Export the data
Execute the export using the chosen method, ensuring you select the right CSV variant (e.g., CSV UTF-8).
Tip: If exporting multiple sheets, repeat the process for each sheet. - 5
Verify the output
Open the CSV in a text editor or CSV viewer and confirm headers, row counts, and encoding are correct.
Tip: Run a quick script to load the CSV and inspect data types. - 6
Handle edge cases
Address quotes, embedded newlines, and non-standard characters before use in downstream systems.
Tip: Test a small sample in your target downstream tool first.
People Also Ask
What is the difference between CSV and XLSX?
CSV is a plain-text format that stores data as rows and fields, with no formatting or formulas. XLSX is a structured spreadsheet format that can include formulas, charts, and multiple sheets. Converting to CSV drops formatting and formulas but improves interoperability.
CSV stores data values only, while XLSX can hold formatting and formulas. Converting to CSV removes formatting but keeps the raw data.
Can I preserve formulas when exporting to CSV?
No. CSV only saves the values that appear in the cells. Formulas are evaluated in the original sheet and the results are saved, not the formulas themselves.
Unfortunately, formulas do not survive CSV export; you only get the resulting values.
How can I export multiple sheets to CSV files at once?
Excel requires exporting each sheet separately or using a script to loop through sheets. Google Sheets exports are per sheet, so you’ll need to repeat the download for each sheet.
Export per sheet, or use a script to automate all sheets at once.
Which encoding should I use for non-English data?
UTF-8 is the safest default encoding for CSVs with non-English characters. If a system or locale requires a different encoding, you can choose accordingly, but test the result.
UTF-8 works well for most cases; test if your system requires something else.
Is there any risk of data loss during conversion?
Data loss can occur if delimiters or encodings clash with your data, or if large cells wrap across lines. Validate by opening the CSV and checking a sample of rows.
There can be small risks if encoding or delimiters aren't handled correctly; validate afterwards.
Do I need Excel to convert XLSX to CSV?
No. You can convert XLSX to CSV using Excel, Google Sheets, or a scripting approach such as Python. Each method has its own setup and benefits.
No — there are several ways to do it beyond Excel, including Sheets and scripts.
Watch Video
Main Points
- Choose the right export method for your workbook size and automation needs
- UTF-8 encoding minimizes character issues across tools
- CSV exports lose formulas and formatting but preserve data values
- Validate the output with quick checks before downstream use
- Automate repeated exports to save time and reduce errors
