Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to batch convert multiple Excel files to CSV files in Excel?

Author Sun Last modified

Converting Excel files to CSV format can be done using the "Save As" function, but manually processing multiple files one by one is time-consuming. If you need to batch convert multiple Excel files into separate CSV files, this guide offers two efficient methods:

Batch convert Excel files of a folder to CSV files with VBA

Convert sheets of workbook into separate CSV files with Kutools for Excelgood idea3


Batch convert Excel files of a folder to CSV files with VBA

In Excel, there is no built-in function to perform this task quickly, except using VBA.

1. Enable Excel, and press Alt + F11 keys open Microsoft Visual Basic for Applications window.

2. Click Insert > Module to create a new Module.

3. Copy below code and paste them to the new Module window.

VBA: Batch convert Excel files to CSV

Sub WorkbooksSaveAsCsvToFolder()
'UpdatebyExtendoffice20181031
Dim xObjWB As Workbook
Dim xObjWS As Worksheet
Dim xStrEFPath As String
Dim xStrEFFile As String
Dim xObjFD As FileDialog
Dim xObjSFD As FileDialog
Dim xStrSPath As String
Dim xStrCSVFName As String
Dim xS  As String
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Application.Calculation = xlCalculationManual
    Application.DisplayAlerts = False
    On Error Resume Next
Set xObjFD = Application.FileDialog(msoFileDialogFolderPicker)
    xObjFD.AllowMultiSelect = False
    xObjFD.Title = "Kutools for Excel - Select a folder which contains Excel files"
    If xObjFD.Show <> -1 Then Exit Sub
    xStrEFPath = xObjFD.SelectedItems(1) & "\"
    Set xObjSFD = Application.FileDialog(msoFileDialogFolderPicker)
    xObjSFD.AllowMultiSelect = False
    xObjSFD.Title = "Kutools for Excel - Select a folder to locate CSV files"
    If xObjSFD.Show <> -1 Then Exit Sub
    xStrSPath = xObjSFD.SelectedItems(1) & "\"
    xStrEFFile = Dir(xStrEFPath & "*.xls*")
    Do While xStrEFFile <> ""
       xS = xStrEFPath & xStrEFFile
        Set xObjWB = Application.Workbooks.Open(xS)
        xStrCSVFName = xStrSPath & Left(xStrEFFile, InStr(1, xStrEFFile, ".") - 1) & ".csv"
        xObjWB.SaveAs Filename:=xStrCSVFName, FileFormat:=xlCSV
        xObjWB.Close savechanges:=False
        xStrEFFile = Dir
  Loop
    Application.Calculation = xlCalculationAutomatic
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    Application.DisplayAlerts = True
End Sub

4. Press F5 key, select the folder contains the Excel files you want to convert to CSV files in first popping dialog.
A screenshot of the first dialog box to select a folder containing Excel files to convert

5. Click OK, then in the second popping dialog, select the folder to place the CSV files.
A screenshot of the second dialog box to select a folder for saving the converted CSV files

6. Click OK, now the Excel files in the folder have been converted to CSV files and saved in another folder.
A screenshot showing the conversion of Excel files to CSV files in a selected folder


Convert sheets of workbook into separate CSV files with Kutools for Excel

As we known, we only can convert the whole workbook into one CSV file in Excel with its Save As function. Sometimes, you may need to convert individual sheets into CSV files. In such cases, the Split Workbook utility of Kutools for Excel can help.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Enable workbook you want to convert its sheets as separate CSV files, click Kutools Plus > Workbook > Split Workbook.
A screenshot showing the Split Workbook utility in Kutools tab in Excel

2. In the Split Workbook dialog, check the sheet name you want to split (all sheets are checked by default), check Save as type, choose CSV (Macintosh) (*.CSV) from the drop-down list.
A screenshot of the Split Workbook dialog box with CSV as the selected format

3. Click Split to pop out a Browse For Folder dialog, choose or create a folder to place the CSV files.
A screenshot of the Browse for Folder dialog to select the destination for the CSV files

4. Click OK, and the workbook will be split into separate CSV files.
A screenshot showing the successful split of workbook sheets into separate CSV files

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now

Demo: Split Workbook using Kutools for EXCEL

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Best Office Productivity Tools

šŸ¤– Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in