How to Convert a Text File to Excel Automatically (3 Ways)

We will convert the following text file, which we named ‘Convert Text File’, to Excel. Here is a preview of how this text file will look after we convert it to an Excel spreadsheet.

convert text file to excel automaticallly


Method 1 – Opening the Text File Directly in Excel to Convert It to Excel File

Steps:

  • Open an Excel File and then go to the File Tab.

  • Select the option Open from the green bar.
  • Select Browse. You will see the Open window appear.
  • Select the Text File from its location and click on Open in the Open.
  • Make sure you have the option All Files.

convert text file to excel automaticallly

  • The Text Import Wizard will show up. Since we separated our columns by a Delimiter (hyphens (—)), we selected Delimiter and went Next.

  • Check Other, enter a Hyphen (), and go Next.

convert text file to excel automaticallly

  • Click Finish.

You will see the data from the Text File appear in the current Excel File.convert text file to excel automaticallly

The data you see is messy, so I formatted the text according to my convenience.


Method 2 – Using the Text Import Wizard to Convert a Text File to Excel

Steps: 

  • Select Data >> From Text/CSV

convert text file to excel automaticallly

  • The Import Data window will open.
  • Select the Text File you want to convert from the location and click on Import. In my case, it is Convert Text File to Excel_1.

  • You will see a Preview Box.
  • Click on Transform.

convert text file to excel automaticallly

You will see your data from the Text File in a Power Query Editor.

  • Select Home >> Split Column >> By Delimiter

  • In the following window, select the Delimiter on which these data from the Text File will split. In our case, it is hyphen ().
  • Select Each occurrence of the delimiter and click OK.

convert text file to excel automaticallly

You will see the data split.

  • To load this table in an Excel sheet, click on Close & Load.

convert text file to excel automaticallly

You will see the information from the Text File as a table in a new Excel sheet. You can format the table according to your convenience.

Read More: How to Import Text File with Multiple Delimiters into Excel


Method 3 – Applying the Get Data Wizard to Convert Text a File to an Excel Table Automatically

Steps: 

  • Select Data >> Get Data >> From File >> From Text/CSV

convert text file to excel automaticallly

  • The Import Data window will open.
  • Select the Text File you want to convert from the location and click on Import. In my case, it is Convert Text File to Excel_1.

  • You will see a Preview Box.
  • Click on Transform.

convert text file to excel automaticallly

  • You will see your data from the Text File in a Power Query Editor.
  • Select Home >> Split Column >> By Delimiter

  • In the following window, select the Delimiter on which these data from the Text File will split. In our case, it is hyphen ().
  • Select Each occurrence of the delimiter and click OK.

convert text file to excel automaticallly

You will see the data split.

  • To load this table in an Excel sheet, click on Close & Load.

convert text file to excel automaticallly

You will see the information from Text File as a table in a new Excel sheet. You can format the table according to your convenience.

Read More: VBA Code to Convert Text File to Excel


Practice Section

Here is the Text File data so you can create your own Text File and convert it to an Excel File.


Download the Practice Workbook


Related Articles

<< Go Back to Import Text File to Excel | Importing Data in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Meraz Al Nahian
Meraz Al Nahian

Md. Meraz Al Nahian has worked with the ExcelDemy project for over 1.5 years. He wrote 140+ articles for ExcelDemy. He also solved a lot of user problems and worked on dashboards. He is interested in data analysis, advanced Excel, statistics, and dashboards. He also likes to explore various Excel and VBA applications. He completed his graduation in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET). He enjoys exploring Excel-related features to gain efficiency... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo