2 min read
By HappyCSV Team

Convert Multi-Sheet Excel to Multiple CSVs

How to export every sheet in an Excel workbook to separate CSV files. Use VBA macros, Python, or online tools to save time.

Convert Multi-Sheet Excel to Multiple CSVs

You have an Excel workbook with 20 sheets ("Jan", "Feb", "Mar"...). You need 20 separate CSV files.

If you use File > Save As > CSV, Excel only saves the active sheet. You have to click each sheet and save it manually 20 times. Painful.

Here is how to export all sheets at once.

Method 1: VBA Macro (Built-in)

You can tell Excel to loop through every sheet and save it.

  1. Open your Excel file.
  2. Press Alt + F11 to open the VBA Editor.
  3. Insert > Module.
  4. Paste this code:
Sub SaveAllSheetsAsCSV()
    Dim ws As Worksheet
    Dim path As String

    path = Application.ActiveWorkbook.Path & "\"

    For Each ws In Worksheets
        ws.Copy
        ActiveWorkbook.SaveAs Filename:=path & ws.Name & ".csv", FileFormat:=xlCSV
        ActiveWorkbook.Close SaveChanges:=False
    Next ws
End Sub
  1. Press F5 to run.
  2. Check your folder. You should see Jan.csv, Feb.csv, etc.

Method 2: Python (Pandas)

If you have Python installed, this is cleaner and doesn't require enabling macros.

import pandas as pd
import os

excel_file = 'data.xlsx'
xls = pd.ExcelFile(excel_file)

for sheet_name in xls.sheet_names:
    df = pd.read_excel(excel_file, sheet_name=sheet_name)
    df.to_csv(f'{sheet_name}.csv', index=False)

Method 3: Google Sheets

Google Sheets also defaults to downloading the current sheet. But you can use a script.

  1. Extensions > Apps Script.
  2. Paste a script (similar logic to VBA) to save files to Drive.
  3. Or, simpler: Download the whole file as ODS (OpenDocument), unzip it, and convert the XMLs... actually, that's too hard. Stick to Method 1 or 2.

Method 4: Online Converters

Some online tools allow you to upload an XLSX and download a ZIP of CSVs.

-> Excel to CSV Converter

Summary

  • Excel default: Only saves active sheet.
  • VBA: Best for quick local batching.
  • Python: Best for automated pipelines.

Don't waste time saving 50 sheets manually!


Too many sheets? HappyCSV can extract all your Excel sheets into separate CSV files in one click.

Need to handle CSV files?

HappyCSV is the free, secure way to merge, split, and clean your data — all in your browser.