Microsoft Excel Tutorial: How to Import Text File

MyHowTo
Microsoft Excel Tutorial: How to Import Text File
Microsoft Excel Tutorial: How to Import Text File

If you have a text file that contains data (columns and rows format), then it is likely you can import that text file into a Microsoft Excel document. The text file you are going to import doesn’t need to have any data, it can be just plain text, but it would probably be more useful to use Microsoft Excel if the text file contained data.

Why?

The biggest issue you would have with storing data in a text file would be finding a way to separate each piece of data and determining which row and which column it is in.

Advertisements

Normally the columns have a separator (comma, space, tab, etc) and the rows are separated into separate lines in the text file.

Locate Text File

The first thing you need is a text file with valid data. For an example, you can create a text file and write the following in it:

Joe Chocolate Blue
John Vanilla Red

The first column is the first name, the second their favorite ice cream flavor, and the third their favorite color. We have two entries (Joe and John). This is a text file with valid data. Use Notepad to save this text file.

Open Microsoft Excel

Open a new instance of Microsoft Excel to use with this import text file tutorial.

Click Data – > Import External Data – > Import Data

A new window will open asking for the file to import. First in the “Files of type”, select “Text Files”. Navigate to the location you saved your text file from step 1 and click Open. The Text Import Wizard will open.

Select Data Type Options

The section called “Original data type” has two choices: delimited, and fixed width. For our example, each column is separated by a space, so it is space delimited. Click delimited. Leave the other options as the defaults and click Next.

Select Delimiter

This “Delimiter” section asks you how you how the columns are separated. In our case, it is with a space so check mark only “Space”. There will be a data preview at the bottom of the import text file wizard that will show you how the data will look. Make sure it looks right in the preview. There are other options in this window that we will leave as defaults. When ready, click Next.

Advanced Options

You will now get more advanced options and formatting choices. Leave them default and click Finish.

Advertisements

Data Location

It will ask you where you want to place the data from the text file import. Leave the options default unless you want to place it in a certain location or a separate datasheet and click OK. You will notice an “External Data” toolbox with further options for the data from the text file you imported.

You will see that the data from the text file is now in the Excel workbook. You have just performed an import on a text file using the built in Microsoft Excel wizard.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Get notified for our new articles.

You May Also Like