How to Create CSV File from Excel (6 Easy Ways)

CSV, short for Comma Separated Values, is a widely used file format used to store delimited records in plain text. It is often used to transfer data between different applications due it’s small file size and simplicity, especially for large datasets. Let’s examine some easy ways to create CSV files from Excel.


Watch Video – Create CSV File from Excel


To illustrate, we’ll use the following source file as our dataset. It’s a daily Sales Report of a particular fast food store, and contains data about the Salesman, Item, and Qty in columns B, C, and D respectively.

how to create csv file from excel

Here, we have used Microsoft Excel 365 version, however you may use any other version of Excel instead.


Method 1 – Using Save As Command

The easiest method for creating a CSV file in Excel is using the Save As command.

Steps:

  • Go to the File tab.

Using Save As Command

  • Click on Save As from the menu.
  • In the Save As section, select the Browse option.

Selecting Browse Option

The Save As dialog box appears.

  • Select CSV (Comma delimited) format in the Save as type box.
  • Click on the Save button.

Working on Save As Dialog Box

Note: After pressing the Save button, you’ll get a warning dialog box reminding you that only the active worksheet will get converted to a CSV file. Perform the above steps for each additional worksheet you want to save.

A CSV file with the same name will be created in the specified location on your PC.

  • Navigate to the file and right-click on it.
  • From the context menu, tap on Open with.
  • Select Notepad from the sub-menu.

Opening Notepad App

The file opens in the Notepad app.

Opening CSV File in Notepad

You can also open the same file with Excel. But it won’t look like before. It’ll show the data without any type of formatting.

Using Save As Command to create csv file from excel

Read More: How to Convert Excel File to Text File with Comma Delimited


Method 2 – Utilizing CSV UTF-8 to Create CSV File Keeping Special Characters

The above method is simple, but it has a drawback. It can’t transform the special characters (Non-ASCII characters). However it is possible to create a CSV file without destroying special characters.

In the following dataset, we have two item names written in Japanese.

Utilizing CSV UTF-8 to Create CSV File Keeping Special Characters

Steps:

Working on Save As Dialog Box

A CSV file of the current sheet will be created. If you open the file in Excel, you can see that the special characters, which were displayed as ??? (question marks) in Method 1, now display correctly in the CSV file too.

  • Open the file in Notepad and observe the same result.

Utilizing CSV UTF-8 to create csv file from excel

Read More: Convert Excel to Comma Delimited CSV File


Method 3 – Applying UTF-16 Encoding

Here’s a different method to create a CSV file with special characters from Excel.

Steps:

  • Like before, open the Save As dialog box.
  • Select Unicode Text format in Save as type.
  • Tap the Save button.

Applying UTF-16 Encoding

A text file will be created with the .txt extension.

  • Open it in Notepad.

Opening CSV File in Notepad

  • Click on the File tab.
  • Select Save As from the options (Press CTRL + SHIFT + S as the keyboard shortcut).

Saving File Again in different format

The Save As dialog box of the Notepad app will open.

  • In the File name box, add a .csv extension after the file name.
  • Select All Files in the Save as type box.
  • Select UTF-16 LE in the Encoding box.
  • Click the Save button.

Save As Dialog Box of Notepad

A CSV file that contains the special characters correctly is created.

Applying UTF-16 Encoding to create csv file from excel

Read More: How to Save Excel File as CSV with Commas


Method 4 – Employing Google Sheets

We can use Google Sheets for the creation of a CSV file from Excel.

Steps:

  • Open a blank spreadsheet in Google Sheets.
  • Jump to the File tab.
  • Click on Import from the available options.

Employing Google Sheets

  • Select the preferred Excel workbook.
  • Click on Import data.

Importing Data from Excel Workbook

The file will open in the spreadsheet.

Data in Google Sheet

  • Proceed again to the File tab.
  • Click on Download.
  • Select Comma Separated Values (.csv) from the options.

Downloading as CSV File

  • Open the downloaded file.

You’ll get a new CSV file as shown in the following picture:

Employing Google Sheets to create csv file from excel

Read More: How to Convert Excel Files to CSV Automatically


Method 5 – Implementing VBA Code

You can automate the prior method entirely with the help of VBA.

Steps:

  • Go to the Developer tab.
  • Click on Visual Basic in the Code group.
  • Alternatively, press ALT + F11.

Implementing VBA Code

The Microsoft Visual Basic for Applications window appears.

  • Go to the Insert tab.
  • Select Module.

  • Paste the following code into the module:
Sub create_csv_from_excel()
Dim wst As Worksheet
Dim path_x As String
Application.ScreenUpdating = False
path_x = ActiveWorkbook.Path & " " & Left(ActiveWorkbook.Name, _
InStr(ActiveWorkbook.Name, ".") - 1)
For Each wst In Worksheets
wst.Copy
ActiveWorkbook.SaveAs Filename:=path_x & "" & wst.Name & ".csv", _
FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close False
Next
Application.ScreenUpdating = True
End Sub

VBA Code to create csv file from excel

  • Run the code.

It’ll create a separate CSV file.

  • Open the file.

Implementing VBA Code to create csv file from excel

Read More: How to Convert Excel to CSV without Opening


Method 6 – Using an Online Converter

We can also create a CSV file without even opening our Excel file, by means of an online file converter.

Steps:

Handling Online Converter Without Opening File

  • Select the Excel workbook you want to convert.
  • Select CSV as the conversion option.
  • Click on the Convert button.

Conterting Excel workbook to CSV File

  • Click on the Download button to download the converted CSV file to your PC.

Downloading File

  • Similarly to above, open the file in Notepad or Excel.

Handling Online Converter to create csv file from excel

Read More: How to Convert Multiple Excel Files to CSV


How to Make a CSV File for Contacts

Here, we have a Contact List as an Excel workbook. Let’s make a CSV file from this dataset.

How to Make a CSV File in Excel for Contacts

Steps:

  • Open the Save As dialog box like before.
  • Select the location to save your new CSV file.
  • Select CSV UTF-8 (Comma delimited) format in the Save as type box.
  • Click on Save.

  • Open the new file in Notepad.

Opening CSV File for Contacts in Notepad


Download Practice Workbook


Related Articles

<< Go Back to Export Excel to CSV | Export Data from Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shahriar Abrar Rafid
Shahriar Abrar Rafid

Shahriar Abrar Rafid, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked with the ExcelDemy project for more than 1 year. He has written over 100+ articles for ExcelDemy. He is a professional visual content developer adept at crafting scripts, meticulously editing Excel files, and delivering insightful video tutorials for YouTube channels. His work and learning interests vary from Microsoft Office Suites and Excel to Data Analysis, VBA, and Video recording and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo