Forum Discussion
heylookitsme
Mar 21, 2025Brass Contributor
Power Query by Default Excludes First Blank Column
I have researched this down the rabbit hole long enough without any answers. In Excel I created a Power Query Get Data from Sharepoint Folders using the Contents method. There are about 10 files wher...
- Mar 24, 2025
With Excel is practically the same, the only you have to define sheet name to combine
let SheetToSelect = "Test", NumberOfColumns = 4, NewNames = List.Zip( { List.Transform( {1..NumberOfColumns-1}, (q) => "Column" & Text.From(q) ), List.Transform( {2..NumberOfColumns}, (q) => "Column" & Text.From(q) ) } ), Source = Excel.Workbook(Parameter1, null, true){[Item=SheetToSelect,Kind="Sheet"]}[Data], n = Table.ColumnCount(Source), AdjustColumns = if n < NumberOfColumns then Table.RenameColumns( Source, NewNames ) else Source in AdjustColumns
heylookitsme
Mar 21, 2025Brass Contributor
I found a solution albeit maybe not the best one. I created two separate queries, modified the one that had the additional column and removed it. Then I appended those two queries together.