Macros

2 ways to Import/Convert TXT File to Excel File

If you have a lot of data in a text file, you may want to convert it to an Excel spreadsheet so you can better analyze the data. Excel can import data from a text file in a couple of different ways.

You can either import the data as text, which will create a new worksheet for the data,
or you can import the data as a query, which will create a new workbook with the data.

Import the data as text

To import the data as text:

  1. open Excel and go to the Data tab.
  2. Click on the “From Text” button in the Get External Data section.
  3. Find the text file you want to import and click on the Import button.
  4. In the Text Import Wizard, select the file type as Delimited and click on the Next button.
  5. On the next page of the wizard, select the delimiter that is used in the text file.(This is usually a comma, tab, or semicolon.). If the text file uses multiple delimiters, you can select them all.
  6. Once you have selected the delimiter, click on the Next button.
  7. On the next page of the wizard, you can choose how you want the data to be imported.
  8. import it as text, which will create a new worksheet for the data

Import the data as query

To import the data as query, follow the same steps to import it as text from 1 to 7:

For the 8th step you can import the data as a query, which will create a new workbook with the data.

If you want to import the data as a query, you will need to select the data range and choose the column headers.

Once you have selected the options, click on the Finish button.

The data will be imported into Excel and you will see the data in a new worksheet or workbook.

Leave a Comment