请问:你是怎样做到的?
原来是这样:let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"品项", type text}, {"项目名称", type text}}),
分组的行 = Table.Group(更改的类型, {"品项"}, {{"列1", each Text.Combine([项目名称],"、"), type nullable text}}),
按分隔符拆分列 = Table.SplitColumn(分组的行, "列1", Splitter.SplitTextByDelimiter("、", QuoteStyle.Csv), {"列1.1", "列1.2", "列1.3", "列1.4", "列1.5", "列1.6", "列1.7", "列1.8", "列1.9", "列1.10", "列1.11", "列1.12", "列1.13"}),
更改的类型1 = Table.TransformColumnTypes(按分隔符拆分列,{{"列1.1", type text}, {"列1.2", type text}, {"列1.3", type text}, {"列1.4", type text}, {"列1.5", type text}, {"列1.6", type text}, {"列1.7", type text}, {"列1.8", type text}, {"列1.9", type text}, {"列1.10", type text}, {"列1.11", type text}, {"列1.12", type text}, {"列1.13", type text}}),
替换的值 = Table.ReplaceValue(更改的类型1,null,"",Replacer.ReplaceValue,{"列1.1", "列1.2", "列1.3", "列1.4", "列1.5", "列1.6", "列1.7", "列1.8", "列1.9", "列1.10", "列1.11", "列1.12", "列1.13"})
in
替换的值 |