Microsoft Office Tutorials and References
In Depth Information
Import Data from a Text File
Import Data from
a Text File
You can analyze the data contained in certain
text files by using the Text Import Wizard to
import some or all of the data into an Excel
worksheet. However, you can only import a
text file into Excel if the file uses either a
delimited or fixed-width format.
A delimited format is a text structure in which
each item on a line of text is separated by a
character, called a delimiter . The most
common text delimiter is the comma (,). Excel
imports a delimited text file by placing each
line of text on a separate row and each item
between the delimiter in a separate cell.
A fixed-width format is a text structure in
which each item on a line of text uses up a set
amount of space and these widths are the same
on every line of text. For example, the first
item on every line might use 5 characters, the
second item on every line might use 15
characters, and so on. Excel imports a
fixed-width text file by placing each line of
text on a separate row and each fixed-width
item in a separate cell.
Start the Text Import
1 Click the cell where you
want the imported data
2 Click the Data tab.
3 Click Get External Data.
4 Click From Text.
The Import Text File
dialog box appears.
5 Open the folder that
contains the text file.
6 Click the text file.
7 Click Import.
The Text Import Wizard –
Step 1 of 3 dialog box
Note: For delimited text, continue
with Import Delimited Data; for
fixed-width text, skip to Import