Apr 05 2023 08:37 AM
I have an Excel where I want to combine the two using power query. This is very easy when the both sheets have the identical headers but sheet 2 has none. I can copy and paste the headers in and it works but can I use Power Query to do this for me?
Apr 05 2023 09:27 AM
That could be like
// Query2
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
names = Table.ColumnNames( Query1 ),
rename = Table.RenameColumns( Source, List.Zip( { Table.ColumnNames(Source), names } ) )
in
rename