|
let
Source = Folder.Files("C:\Test\合并求助"),
Table = List.Transform( Source[Content] , each Excel.Workbook(_)[Data]{0}),
Position = List.Transform( Table, each List.PositionOf(_[Column1],"Transaction creation date")),
Data = List.Transform( {0..Table.RowCount(Source)-1}, each Table.PromoteHeaders(Table.Skip(Table{_}, Position{_}))),
Headers = List.Distinct(List.Combine(List.Transform( Data , each Table.ColumnNames(_)))),
CombinedData = Table.Combine( List.Transform({0..Table.RowCount(Source)-1}, each Table.FromRows({ {Source[Name]{0}} & {Data{0}} })) ),
#"Expanded Column2" = Table.ExpandTableColumn(CombinedData, "Column2", Headers)
in
#"Expanded Column2" |
|