How to Import CSV Data into Excel (5 Handy Approaches)

A CSV runs faster than an Excel file. Sometimes, you need to import data from a CSV file into an Excel file. You need not convert CSV to an Excel file, you can just import it. This article will show you how to import CSV data into Excel.


Download Practice Workbook

You can download the practice books from the link below.


What Is CSV Data?

CSV (i.e. Comma Separated File) is mainly one type of text file for storing data in it. In this type, data is stored in the file separated by commas. It is user-friendly in the case where a user can’t edit data in the Excel file, but can easily edit in the CSV file. This file type is also one common platform for exchanging data from one application to another. However, CSV files can be opened with Notepad.


5 Ways to Import CSV Data into Excel

Let’s say, we have created a CSV file where some information about employees is described.

CSV Data

For some reason, we need to import the CSV data into an Excel file. Excel provides you with several handy approaches to import CSV data into it.

In this section, you will find 5 effective approaches to import CSV data into Excel. I will demonstrate them one by one here. Let’s check them now!


1. Import CSV Data from Text/CSV Feature

Here, we will demonstrate the method to import CSV data into Excel from the Data tab using the From Text/CSV feature. In order to serve this purpose, just follow the steps below.

Steps:

  • Firstly, go to the Data tab> select From Text/CSV feature under the Get & Transform Data group.

Import CSV Data into Excel with From Text/CSV Feature

  • Then, the Import Data window will appear.
  • Here, select Text Files(*.prn;*.txt;*.csv) type, and hence only the Text (more specifically CSV) type file will be displayed in the Import Data window. Now, select the CSV file (i.e. Employee Info)and click Import.

Import CSV Data into Excel

  • Now, a pop-up will appear in the Excel window describing the CSV file name (i.e. Employee info).
  • At the right-end corner of the pop-up window, click the dropdown arrow just right to Load, and two options: Load and Load to will be available. Select Load to.

  • After that, the Import Data dialog box will show up. Choose where you want to import the CSV file (Existing/ New Worksheet) and click OK.

  • As a result, your CSV data will be imported to the Excel sheet in tabular form.

CSV Data Imported into Excel

Read More: How to Import Text File to Excel Automatically (2 Suitable Ways)


2. Use Get Data Option to Import CSV Data

In this method, we will utilize the Get Data option under the Data tab. This procedure is almost similar to that of Method 1.  In order to do so, let’s proceed with the steps below.

Steps:

  • First, go to the Data tab> click Get Data> choose From File> select From Text/CSV.

Import CSV Data into Excel with Get Data Option

  • Then, just repeat the steps stated in Method 1 successively and Excel will import the CSV data into it.

Read More: How to Import CSV into Existing Sheet in Excel (5 Methods)


3. Using Power Query

Applying the Power Query feature can help to import CSV data into Excel. Follow the steps for applying this feature for your purpose.

Steps:

  • Firstly, go to the Data tab> select From Text/CSV feature under the Get & Transform Data group.

Import CSV Data into Excel with From Text/CSV Feature

  • Then, the Import Data window will appear.
  • Here, select Text Files(*.prn;*.txt;*.csv) type, and hence only the Text (more specifically CSV) type file will be displayed in the Import Data window. Now, select the CSV file (i.e. Employee Info)and click Import.

Import CSV Data into Excel

  • Now, a pop-up will appear in the Excel window describing the CSV file name (i.e. Employee info). Click Transform Data.

  • Now, the Power Query Editor window will appear. Click dropdown of Split Column > select By Delimiter.

Import CSV Data into Excel with Power Query

  • In the Split Column by Delimiter box, select Comma as Delimiter and Split at Each occurrence of the delimiter> click OK.

  • Then, Use First Row as Headers if your datatype is so.

  • After that, click Close and Load.

Import CSV Data into Excel

  • Hence you will get the data imported to the worksheet.

Read More: Excel VBA: Import Comma Delimited Text File (2 Cases)


Similar Readings


4. Using Text Legacy Wizard

We will show the use of Text Legacy Wizard to import CSV data into an Excel file. This option can be utilized from the Excel Options. So, let’s start the process like the one below.

Steps:

  • First of all, click the File menu at the top-left of the Excel window. Then a menu list will appear. Click Options from the end of the menu list.

  • Then, the Excel Options dialog box will appear. From the list, select Data. Now, under the Show legacy data import wizards group, mark From Text (Legacy) option and click OK. Then, Excel will switch to the worksheet window.

  • Now, click the drop-down arrow of the Get Data feature under the Data tab> select Legacy Wizards> click From_Text(Legacy).

Import CSV Data into Excel Using Text Legacy Wizard

  • After that, the Import Text File box will appear. Select the CSV file and click Import.

  • Then, the Text Import Wizard will appear. In Step 1 of 3, keep the Delimited option marked and My data has headers (if your data contains header row) > click Next.

  • In Step 2 of 3 of the wizard, choose Comma as Delimiters>click Next.

Text Import Wizard to Import CSV Data into Excel

  • After that in Step 3 of 3, keep the Column data format as General> click Finish.

  • Then, in the Import Data dialog box, choose the worksheet (i.e. Existing/New) where you want to import CSV data and click OK.

  • Then, you will get the CSV data imported to the Excel worksheet.

Read More: How to Import Text File to Excel Using VBA (3 Easy Ways)


5. Using VBA Code

You can also apply VBA code to import CSV data into Excel. For doing this task, follow the steps below.

Steps:

  • First, right-click on the worksheet name and select View Code.

  • Then, the VBA editor window will appear. Enter your code here. You can use the following.

Code:

Sub ImportingCSVFile()
Dim wkSheet As Worksheet, rfFile As String
Set wkSheet = ActiveWorkbook.Sheets("VBA")
rfFile = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Provide Text or CSV File:")
With wkSheet.QueryTables.Add(Connection:="TEXT;" & rfFile, Destination:=wkSheet.Range("B2"))
.TextFileParseType = xlDelimited
.TextFileCommaDelimiter = True
.Refresh
End With
End Sub

  • Now, press CTRL+F11 to switch back to the worksheet.
  • After that, press CTRL+F8 to open the Macro command box. Select the Macro name and click Run.

  • Hence Excel will run the code and take you to the Provide Text or CSV File window. Select the file and Open it.

  • As a result, your CSV data will be imported into the Excel worksheet.

Read More: Excel VBA to Import CSV File without Opening (3 Suitable Examples)


Opening CSV File from Folder Directory

If you want to open the CSV file from fa older directory except importing it, Excel also allows you to perform this task. The steps below describe the procedure in short.

Steps:

  • First of all, click the File tab and select the Open option> click Browse.

Open CSV Data from Folder Directory

  • Then, select the File type and Open the file.

  • Now, click Finish in Step 1 of 3 of the Text Import Wizard box.

  • Hence, the CSV file will be opened.

Read More: How to Open CSV with Delimiter in Excel (6 Simple Ways)


Conclusion

In this article, I have tried to show you some methods on how to import CSV data into Excel. I hope this article has shed some light on your way to this. If you have better methods, questions, or feedback regarding this article, please don’t forget to share them in the comment box. For more queries, kindly visit our website ExcelDemy. Have a great day!


Related Articles

Rafiul Hasan

Rafiul Hasan

Hey there! I am Md. Rafiul Hasan. Currently, I am working as an Excel & VBA content developer. I like new ideas and want to explore the field of innovation. Excel has saved our work time and made it easy for us to perform quick calculations. I am trying to make it easier for you to overcome the obstacles you face while working on Excel. Stay connected!

We will be happy to hear your thoughts

Leave a reply

5 Excel Hacks You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo