It is very difficult to manage and time-consuming task to manually transfer data from a text file to Excel. But we can convert text file to Excel with delimiters and split the data into separate columns quickly and efficiently.
Figure 1. Convert Txt to Excel
How to Convert a Text File to Excel
We save the text files in .txt, .csv or .prn extensions in our computers. These text files may contain data which we use for data manipulation in Excel. It is a very hard task to manage the data while transferring the required information from txt to Excel. Suppose we have a text file, created in Notepad, where information is entered and separated with Tab delimiter. We want to convert text file to Excel while placing the data into separate columns with the delimiter used in the text file.
Figure 2. Text File in Notepad
Follow the below steps to convert txt to Excel;
- Open an Excel Blank workbook
- In Excel 2003 click File menu, in Excel 2007 click Office button, in Excel 2010 and later versions click on the File tab and select Open.
Figure 3. Select Open
- From the File type drop-down list, select the Text File.
Figure 4. Select File Type Text File
- Select the text file and click on Open button.
Figure 5. Open Text File
- From the Text Import Wizard window, select the delimited option as step 1 and press Next button.
Figure 6. Text Import Wizard Step 1
- Select the Delimiter from the list and preview the data from the Data Preview window as step 2 and press Next button. Optionally select the “Treat consecutive delimiters as one” option and preview the data. In our example, we have selected Tab as the delimiter.
Figure 7. Text Import Wizard Step 2
- In step 3, we can select each column and set the Data Format. By default, it is set as General. Press the Finish button.
Figure 8. Text Import Wizard Step 3
- Excel converts the text file to Excel into separate columns with the delimiter used. Save this file as .xlsx (Excel Workbook) file type.
Figure 9. Convert Text File to Excel