Import a Text File into Excel


How do you import a text file of data into Microsoft Excel? Let’s discuss two different ways of doing this:

  1. Power Query Editor
  2. Text Import Wizard

Power Query Editor

Below is a screenshot of our text file. This file People.txt was opened in Notepad++ and a screenshot was taken with Microsoft’s Snipping Tool.

In an Excel file, go to the Data tab and click From Text/CSV. Navigate to your text file and select it. Click the Import button. You will see something similar to the screenshot below.

Click Transform. You will see the Power Query Editor as shown below.

Go to the Home tab and click Close and Load. Excel now has loaded the data into a table. We know it’s a table because we see the Table Design menu when we place the cursor in one of the table cells.

Import Text Wizard

Another way to get the People.txt data into Excel is to Open the file from within Excel with File Open.

Step 2.

Click each column and choose Text for each. After doing that your screen will look something like the one below.

After clicking Finish, we get the below final result, which, unlike the Power Query Editor method, is not a table.

Leave a Reply