|
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
自定义1 =
Table.AddColumn(
源,
"q",
each
let
A =
if Text.Contains( [备注], ":" )
then
let
a = Text.Split( [备注], ":" ),
b = List.Transform( Text.SplitAny( a{1}, ",," ), (x)=> a{0} & ":" & x )
in
b
else Text.SplitAny( [备注], ",," ),
t =
List.Transform(
A,
(z)=>
let
a = if Text.Contains( z, "号" ) then Text.Split( z, "号" ){1} else z,
b = Text.Split( a, "、" )
in
b
),
B =
List.Transform(
List.Combine( t ),
(x)=>
if Text.Contains( x, "(" )
then
let
a = Text.Split( x, "(" ),
b = List.Transform( Text.Split( Text.Remove( a{1}, ")" ), "+" ), (y)=> a{0} & y )
in
b
else {x}
)
in
List.Combine( B )
),
#"展开的“q”" = Table.ExpandListColumn(自定义1, "q")
in
#"展开的“q”" |
|