Home › Guides › Convert in Excel
How to convert XLSX to CSV in Excel
Step-by-step: save an Excel workbook as CSV on Windows, Mac and Excel for the web, which CSV type to choose, and a macro that saves every sheet.
Excel can save any workbook as a CSV file with Save As. It takes under a minute, but there are two catches: Excel saves only the sheet you're looking at, and it offers four kinds of CSV that behave differently. Here's how to get it right on Windows, Mac and the web.
Save an XLSX file as CSV in Excel for Windows
- Open the .xlsx file in Excel and click the tab of the sheet you want to convert. Only this sheet will be saved.
- Click File, then Save As. If your file is on OneDrive and AutoSave is on, the menu says Save a Copy instead.
- Choose a folder (click Browse if you don't see the one you want).
- Open the Save as type list and pick CSV UTF-8 (Comma delimited) (*.csv).
- Click Save. If the workbook has more than one sheet, Excel says it can save only the active sheet. Click OK.
- A yellow bar may warn that some features might be lost in the CSV format. That's expected: CSV has no formatting, formulas or extra sheets. Your original .xlsx file isn't changed.
Watch out: after saving, the window you're looking at is the CSV, not your workbook. Close it without saving again, and reopen the .xlsx if you want to keep working. Otherwise, your next edits go into the CSV, and they'll lose their formatting.
Which CSV type should you choose?
The four CSV options differ in encoding, the way characters are stored as bytes:
- CSV UTF-8 (Comma delimited) stores every character there is: accents, emoji, Chinese, Arabic. Use it unless something tells you otherwise. It's in Excel 2016 for Microsoft 365 and every version since.
- CSV (Comma delimited) uses your Windows code page, usually Windows-1252 in the US and Western Europe. Characters outside that set, such as Polish ł, Greek, Chinese or emoji, become question marks. Once that happens, the data is gone from the CSV.
- CSV (Macintosh) and CSV (MS-DOS) use very old encodings. Only pick them if an old system asks for them by name.
Excel's UTF-8 CSV starts with a byte order mark (BOM), which helps Excel open the file correctly later. A few strict importers choke on the BOM. If one does, our converter can write UTF-8 without it.
Excel for Mac
- Open the workbook and select the sheet you want.
- Click File › Save As.
- In File Format, choose CSV UTF-8 (Comma-delimited) (.csv).
- Click Save, and confirm when Excel says only the active sheet will be saved.
No Excel on your Mac? See how to convert XLSX to CSV on a Mac with Numbers, which is free.
Excel for the web
In Excel for the web (the free browser version that comes with a Microsoft account), open the workbook, then click File › Export › Download this sheet as CSV (.csv). Like the desktop app, it exports one sheet at a time.
Save every sheet as a CSV with a macro
Excel has no "all sheets" button. If you have many sheets, this short macro saves each visible sheet as its own CSV file next to the workbook, named after the sheet:
- Save the workbook first, so it has a folder to save next to.
- Press Alt+F11 to open the VBA editor, then click Insert › Module.
- Paste the code below, click inside it, and press F5 to run it.
Sub SaveEverySheetAsCSV()
Dim wb As Workbook, ws As Worksheet, folder As String, n As Long
Set wb = ActiveWorkbook
If wb.Path = "" Then MsgBox "Save the workbook first.": Exit Sub
folder = wb.Path & Application.PathSeparator
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each ws In wb.Worksheets
If ws.Visible = xlSheetVisible Then
ws.Copy
ActiveWorkbook.SaveAs Filename:=folder & ws.Name & ".csv", FileFormat:=xlCSVUTF8
ActiveWorkbook.Close SaveChanges:=False
n = n + 1
End If
Next ws
Application.DisplayAlerts = True
Application.ScreenUpdating = True
MsgBox "Saved " & n & " CSV files to " & folder
End Sub
It overwrites any CSV with the same name in that folder without asking. You don't need to save the macro afterward. If you close the editor and save the workbook as .xlsx, Excel drops the code, which is fine. If your Excel is older than 2016, change xlCSVUTF8 to xlCSV.
Or skip the macro: our converter turns every sheet into a CSV in one click, with no Excel needed.
What ends up in the CSV
- Values as displayed. A cell formatted as currency is saved as
$1,250.00, not1250. A date is saved the way it's shown. Formulas are saved as their results. - One sheet. Only the active sheet is saved. Charts, images, comments, colors and column widths are dropped.
- Your regional separator. In countries that use a comma as the decimal mark, Excel writes semicolons between fields even though the menu says "Comma delimited". That comes from the list separator in Windows' region settings.
Leading zeros, like those in ZIP codes, are saved correctly if they show in the cell. If they vanish when you reopen the CSV, that's Excel stripping them on the way in. Here's how to open a CSV without losing leading zeros or accents.
Skip the steps: convert every sheet to CSV in your browser, free.
Convert XLSX to CSV