If you have a list of items in a text file and you want to import data from a text file into Microsoft Excel, you can do that without writing them manually. There is an option in Excel that allows users to import all the texts from .txt file into the spreadsheet so that users can do the job quickly.
Let’s assume that you have a product list in a Notepad or.txt file, and you need to import them in a column in an Excel spreadsheet. There are two ways to do that. First, you can manually copy and paste all the texts from the .txt file and paste it in the spreadsheet. Second, you can use the in-built option of Microsoft Excel to make it easier. The second method is convenient when you have a large number of texts that need to be imported.
How to convert a Text file into an Excel spreadsheet
Let us see how to import or export data from a Text file to convert a Text (.txt or .csv) file into an Excel (.xlsx) spreadsheet easily To import data from a text file into Microsoft Excel, follow this step by step guide-
- Create a blank spreadsheet in Excel
- Go to the Data tab
- Click on From Text/CSV
- Select text file in your computer and click the import button
- Choose the file origin and click the Transfer Data button
- Select which columns you want to import
- Click the Close & Load button
Furst, create a blank spreadsheet in Microsoft Excel and make sure that you have the .txt file in your PC. After that, switch from the Home tab to the Data tab.
Here you can find an option called From Text/CSV. If you cannot find this option, go to Get Data > From File > From Text/CSV.
Then, you have to select the text file from where you want to fetch the data. After clicking the Import button, it asks you to enter the File Origin. If you have created the file, you can go with Western European (Windows) or anything that matches the origin. After doing that, click the Transfer Data button.
It will open the Power Query Editor window. From here, it is possible to choose the column that you want to keep or remove. There are two options named Choose Columns and Remove Columns.
Similarly, you can get options to save and delete rows as well. Use them to customize your data and click the Close & Load button to complete the importation.
That’s it!
Now, you should find your text file data in the spreadsheet.