Randomized columns in source CSV file

phitho

New Member
Joined
Aug 26, 2014
Messages
34
I have a CSV file I export from my help desk software, and quite often it will re-arrange the order of the columns. When this happens, Power Query cannot find my columns, so I have to rebuild my query from scratch. Here is an example of what I mean:

- I have the following columns: Status-Company-Overtime-Priority
- When imported into PQ, the column names are Status-Company-Overtime-Priority-Status_1-Company_2-Overtime_3-Priority_4-Status_5-Company_6-Overtime_7-Priority_8

When the order changes on export, so do the _(number) for my columns.

I merge the columns into one single column, but I am wondering if there is a way to add a wildcard to my Advanced Editor for each column so PQ ignores the appended _(number) at the end of each column?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,497
any representative example of the "incorrect" csv file?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,714
Messages
5,833,279
Members
430,201
Latest member
Deepakpilla36

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top