Importing CSV File into Excel (With 2 Examples)

CSV is short for Comma Separated Values – a kind of Text file with the .csv extension, where the data on each line is split by commas.

Let’s import a csv file into Excel using two different methods.

Example 1 – Import CSV File with Comma in Excel

STEPS:

  • Prepare and save a text file with headers and row data separated by commas like this:

Format CSV File with Comma in Excel

  • Open a new Excel workbook.
  • Click Data tab and select From Text/CSV.

  • A window opens to select the CSV file.
  • Click the file just created and select Import.

  • A preview window opens containing the text to be imported.
  • In this window, set the File Origin as 65001: Unicode (UTF-8).

Format CSV File with Comma in Excel

  • For the Delimiter, select Comma.
  • Click Load to close the window.

Format CSV File with Comma in Excel

  • A new table is displayed as formatted from the CSV file.

  • To change the Sales Amount format, select the range D3:D7.
  • Right-click on it and select Format Cells from the context menu.

  • Select Accounting from the Number tab.
  • Select Symbol.

  • Click OK to return the final output.

Read More: How to Keep Leading Zeros in Excel CSV Programmatically


Example 2 – Format CSV Data with Commas & Quotation Marks

Let’s prepare a text file containing both commas and quotation marks as the separators, and import it into Excel.

  • Create and save the following CSV file:

Format CSV Data with Comma & Quotation Mark

  • Import this file using Data > From Text/CSV, as in Example 1.
  • The preview table is displayed.
  • Change the File Origin and Delimiter as in the image below.

CSV File Excel Formatting

  • The formatted CSV file is imported into Excel.

Note: You can use any of the following separators in a CSV file.

  • , (comma)
  • TAB (the tab key)
  • ; (semi-colon)
  • | (pipe)
  • ^ (carat)

Read More: How to Fix CSV File in Excel


How to Save CSV File in Excel

STEPS:

  • Click the File tab in a prepared Excel sheet.

How to Save CSV File in Excel

  • Select Save As from the left side panel.

  • Select CSV UTF-8 (Comma delimited) as the File Type.

  • Click Save.

Read More: Paste Comma Separated Values into Excel


Things to Remember

  • Make sure there is no space between values and commas in the CSV file.
  • Header rows are required in the text file to be imported.
  • For saving the file in CSV format, keep the same format of the values matched.

Download Practice Workbook


Related Articles


<< Go Back to Import CSV to Excel | Importing Data in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sanjida Mehrun Guria
Sanjida Mehrun Guria

Hello! Welcome to my blog. I have completed my Bachelor in Architecture from Ashanullah University of Science & Technology, Dhaka. I am a passionate, goal-oriented person with an immense thirst for knowledge and an attitude to grow continuously. Besides Architectural work, I find it very enthusiastic to work in Excel blogging. Exceldemy is a platform where I have got the opportunity to flourish my skill in Microsoft Excel and therefore, here I will be posting blogs related to... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo