Power Query or Get & Transform (In Excel 2016) lets you perform a series of steps to transform your Excel data.
But what if your data source is not in your Excel spreadsheet?
If it’s inside a text file, it’s very easy to import data from text and right into Power Query!
Let’s suppose you have this set of data from a text file:
STEP 1:
Using Excel 2016 (screenshot below)
Go to Data > New Query > From File > From Text
Using Excel 2013 or Excel 2010
Go to Power Query > From File > From Text
Select the text file (with extension .txt) that contains the data. Click Import.
A preview of the text data will be shown. If it looks good, press Edit.
STEP 2: This will open up the Power Query Editor.
Go to Home > Transform > Use First Row As Headers.
This will give your table the correct Column Headers.
STEP 3: Click Close & Load from the Home tab and this will open up a brand new worksheet in your Excel workbook with the imported table.
You now have your new table from the text file!
Import Data from Text Using Power Query or Get & Transform
Bryan
Bryan is a best-selling book author of the 101 Excel Series paperback books.