Power Query – How to Add Previously Deleted CSV Columns

importmicrosoft excelpower-query

After you use Power Query to load a CSV file, it only shows the columns you chose when you first created the query.

What if you suddenly want to start using a column you previously deleted in the query?

While Power Query's Advanced Editor can be used to modify the code that controls that, is there an easy way to do so through the UI?

For example, if you previously removed the dummy column from the following CSV file, and now you want it back:

Name    ID      dummy   Number
John    1234    1       324234
Steve   1230    2       124536
Deb     1293    3       968578

Compare to Text Import where all you have to do is click Edit on the query and run the wizard again.

Excel's Text Import Wizard

Best Answer

The Power Query window includes an Applied Steps pane where you can review and edit the query. You can select the step where you removed the column and either edit it (click gear button next to step name) or delete that step and re-create it.

Related Question