Open tnclark8012 opened 7 years ago
Hi Taylor, not sure you know, I have a post on this topic https://bondarenkoivan.wordpress.com/2015/04/17/dynamic-table-headers-in-power-query-sap-bydesign-odata/
Having rename_table you can rename columns without recursion:
NewNames= Table.ColumnNames(flatfile_header), RenameColumns = (table as table, index as number, newNames as list) => let oldName = Table.ColumnNames(table){index}, newName = newNames{index} in if index < List.Count(newNames) then @RenameColumns(Table.RenameColumns(table, {{oldName, newName}}), index+1, newNames) else table, Result = RenameColumns(#"Changed Type", 0, NewNames)