Getting external data from a text file
The most important requirement for getting data from a text file is identifying the character where the column splits will occur – this is known as the delimiter.
For example, full names may be split by a space as in John Smith, or by a comma as in Smith, John.
Alternatively, you can choose to split the text after a fixed number of characters.
If the text and required split is more complicated, it may be easier to work with the text in Microsoft Word first and create a table there, and then copy and paste it into Excel.
To get data from a text file:
The Import Text File dialog box will be displayed – this is similar to a standard Open dialog box.
The Text Import Wizard will be started.
Step 1
The Preview box shows the content of the data file.
In Step 1, you can choose to split the text using a delimiter (a particular character), or using fixed width (a particular number of characters).
You can also choose to import data from row 1 of the source file, or any other row number.
If you do not want to import the whole file:
If you know that the file uses a particular character set:
If the first line of data contains headers:
When you are ready:
Step 2 ~ Delimited
If you choose Delimited, the Delimiters options are shown in Step 2.
You can choose the character on which to create the split. As you make changes, you can see the results in the Data preview area.
Step 2 ~ Fixed width
If you choose Fixed width, you will see options for setting break lines.
In Step 2, you can set the widths for each column – Excel will normally suggest the break lines if it can tell that the columns are of fixed width.
Column breaks are indicated in the preview.
Step 3
In Step 3, you can adjust the individual columns that are being created.
For each column:
When you are ready:
The Import Data dialog box will be displayed.
The data will be imported into Excel. A connection to the data source will probably be established, but security settings on your computer could prevent this.