Convert Excel to CSV (Table of Contents)
Convert Excel to CSV File
We save files in different formats like Word, PowerPoint, Excel, Text, and Macro enabled book, etc. CSV is one of the formats available for saving files in Excel. However, before learning how to convert an Excel file to CSV, first, we will understand the full form of CSV and its importance.
The full form of CSV is Comma-Separated Value. Why it is called a Comma separated value is because a Comma separates each column in CSV. It stores the data in table format as plain text as it stores data as plain text, various software programs, and applications for import and export. Therefore, it will organize better when working with huge data.
How to Convert Excel to CSV?
Let’s understand how to convert Excel to CSV and different kinds of Excel CSV formats by using some examples.
Example #1 – Conversion of Excel to CSV
Consider a file which has data with Names, Age and Salary as shown in the below screenshot.
Once data is inserted, try to save the file with Save As option. Select the path where you want to save the file and select the Save as type as CSV (Comma delimited), which is highlighted.
Give the file name as per your requirement and save it. Here I have given Name as Convert Excel to CSV.
Now we will see how it is saved. Observe the file that is saved in CSV (Microsoft Excel Comma Separated Value File) is our CSV file. We can observe the icon is also different from the Excel file.
Now we saved the file in CSV, but if we observe there is “(Comma delimited),” similarly, we have some other formats of CSV files. We will see each of the Excel CSV file and what is the meaning and purpose of different formats.
There are 4 different formats of CSV file. They are Comma delimited, Macintosh, MS-DOS and UTF – 8.
We can observe different CSV formats in Excel. Now we will see an explanation for each of them.
- CSV (Comma delimited) – This format converts the data to plain text separated by commas, and another Windows Operating System can use this format files.
- CSV (Macintosh) – This format files also save the same as comma-separated but can use this in the Mac operation system.
- CSV (MS-DOS) – This format file can be used in the MS-DOS operating system.
- CSV UTF-8(Comma Delimited) – UTF-8 uses 1 to 4 bytes for each symbol.
When we save a CSV format file, it will only save the currently active tab of excel. If we want all the sheets in Excel into CSV format, we need to do it individually. Regarding this, we may get the message while saving the file in the form of a warning pop-up.
In addition to this, we may get another pop-up message stating that our saved file has features that may not be compatible with CSV format. Do you want to save it? Just click, Yes to proceed further.
I hope you understand how to convert Excel to CSV and the different CSV formats available.
If we want to see the CSV in text format, in case if it opens in Excel, select the file and right click then choose the option Open with.
Choose Notepad and see how the data stores in the CSV separated by commas. Observe Comma separates every column.
Open a CSV file in Excel.
We can access our CSV files from our Excel spreadsheets directly. We will see how we can do that.
Open an excel file and click on the File menu, then the below screen will appear. From that, Choose the Open option from the list of options. It will take to share drive path go to the path where our file is saved and select .CSV file.
Then the file opens, as shown in the below screenshot.
If we observe A’s salary as 1E+11 because as we directly opened CSV in excel, it converts to exponential format in case if any number starts with Zeros, it will convert to a mathematical format so that it will remove the Zeros. It will display only the other part of the number.
Example #2 – Conversion of Excel to CSV with UTF-8
First, we will understand why we need to use UTF-8. When an excel spreadsheet has foreign characters and if we follow the same process of “save as” in the CSV format, it may not work because that way is suitable for ASCII characters if the text is apart from the ASCII characters that are in a foreign language it may distract the data.
UTF-8 uses 1 to 4 bytes for each symbol. It is most useful when your file has ASCII characters as it stores in one byte each. To convert the file with foreign language characters, follow the below procedure. Suppose we have a file that has text in the Chinese language, as shown in the below screenshot.
To convert to CSV, first save the file in the Unicode Text format as shown in the below screenshot.
Please open the file; it will look like the below text file.
If we observe the above screenshot, each column is separated by tab space. In the CSV file, each column is separated by the “,” character.
So, we need to replace the space with the “,”. Copy the space between two columns.
Press Control+H to find and replace the text. In “find what”, give the control v to paste the copied space. In Replace with option input “,” and click on the option Replace All.
Once we click on Replace All, space will be replaced by “,”.
Now save the file with “.CSV” format and change the encoding option to UTF-8. Change the save as type as All Files.
Things to Remember About Convert Excel to CSV
- The full form of CSV is Comma-Separated Value.
- To convert an Excel to CSV, use the Option save while saving the file and selecting the CSV format.
- There are 4 different CSV formats, they are CSV (Comma delimited), CSV (Macintosh), CSV(MS-DOS) and CSV UTF-8.
- We can convert all sheets of excel workbook at a time.
Recommended Articles
This is a guide to Convert Excel to CSV. Here we discuss how to Convert Excel Files to CSV along with practical examples and a downloadable excel template. You can also go through our other suggested articles –
23 Online Courses | 9 Hands-on Projects | 110+ Hours | Verifiable Certificate of Completion
4.9
View Course
Related Courses