In this lesson you will learn how to import data from a text file. As a example I will import lyrics of Justin Bieber's Love me song.
On the Data ribbon, the first section is called Get External Data:
The third command from the left: From Text allows you to import data from a text file. After its use, the window appears in which you specify the file to import. Then start the Text Import Wizard:
In the first step of the wizard, specify the type of the file:
- Is it a delimited file? The following columns are displayed with a sign (eg. space, comma or tab). When Excel finds such a character in the line of the file knows that more data is entered in the next column.
- Is it a file with fixed width? In this file the next column take up a certain amount of characters. For example, the first column is ten characters and the other eight. After entering in the first column of ten characters typed to the next the next eight and so on.
Sometimes, the data in the file are preceded by a header. The system generates a text file that can be placed in the file generation date, name or other comments to the data. The Start import at row allows you to bypass this information and start downloading data from the right place.
File Origin box usually leave unchanged. If the file in the preview below instead of letters you can see incomprehensible characters, you need to change this option.
Clicking Next move on to the second step of the wizard:
In this step, you specify which character separates columns in the file. The default is a tab. Below you can see preview of the imported file, the data is already in its columns. So I press on.
If you choose pre-delimited text (as in this example), this is where you can specify which columns are separated by a text file. In this case, it is a space.
In the third step just choose data format of imported data. I chose text.
Next Excel will ask you where to paste the text. I want to import it to existing worksheet beginning from A1 cell.
Excel imported text. Every word is in separated cell as I wanted to do.
Now I can change every word of this "song" into better one.