这是使用
POWER QUERY
时执行此操作的一种方法:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
DemotedHeaders = Table.DemoteHeaders(Source),
Transpose = Table.Transpose(DemotedHeaders),
UnpivotOtherCols = Table.UnpivotOtherColumns(Transpose, {"Column1"}, "Attribute", "Value"),
RemovedCols= Table.RemoveColumns(UnpivotOtherCols,{"Attribute"})
in
RemovedCols