5楼用了 自定义函数,我也提供一种方法吧
let
源 = Excel.Workbook(File.Contents("C:\搜狗高速下载\菜单.xlsx"), null, true),
删除的其他列 = Table.SelectColumns(源,{"Data"}),
自定义1 = Table.TransformColumns(删除的其他列, {"Data",each Table.UnpivotOtherColumns(Table.SelectRows(Table.PromoteHeaders((Table.FillDown(Table.Skip(_,2),{"Column1"})),[PromoteAllScalars=true]),each [类别] <> null),{"餐别", "类别"}, "属性", "值") }),
#"展开的“Data”" = Table.ExpandTableColumn(自定义1, "Data", {"餐别", "类别", "属性", "值"}, {"餐别", "类别", "属性", "值"}),
更改的类型 = Table.TransformColumnTypes(#"展开的“Data”",{{"属性", type date}})
in
更改的类型 |