In this tutorial, I will demonstrate the "Import Text Data" facility of Excel. This facility is useful when you have text file and you wish to get its data into excel cells. There are two ways, on how you can import the data to excel,
- Fixed Length
- Delimited
As you can see that each data in the above file has a fixed width. Lets say, you wish to import this data to the following sheet.
You can copy paste from file to each excel cell and accomplish the task. However this may not be a short task if the text file has hundreds and thousands of lines in it. Luckily Excel has a facility to do that for you. To avail that, go to "Data" tab and choose "From Text"
You will see a file open dialog. Locate the text file from which you wish to import the data and Click on "Import"
You will see a dialog like the one below. It will also show the first few lines from the text data file.
Choose the "Fixed Width" option on it (it is selected by default though) and click on "Next". You will see another dialog with some few columns automatically divided by Excel, if it was able to detect some.
As you can see, Excel was not able to detect the salary part of each line. You can just click on the column you wish to place another separator on the line.
Once you are happy with the separators, click on "Next". You will see another dialog where you can choose to assign a format to each of your columns.
Change the formats, if you wish to then click on "Finish". You will see a small pop-up like the one below.
You can choose the destination cell on this which will be the initial cell for Excel to start import. Once you click on "OK", you should see the following result.
Congrats, you have just learned one of the very useful features in Excel.
0 comments:
Post a Comment