- let
- 源 = Excel.CurrentWorkbook(){[Name = "表1"]}[Content],
- 更改的类型 = Table.TransformColumnTypes(源, {{"Part No.", type text}, {"Materialflow", type text}}),
- 已添加自定义 = Table.AddColumn(
- 更改的类型,
- "拆",
- each Table.FromColumns(
- [
- a = Text.Split([Materialflow], "/"),
- b = List.Range(a, 0, List.Count(a) - 1),
- c = List.Range(a, 1, List.Count(a) - 1),
- d = {b, c}
- ][d],
- {"Start", "End"}
- )
- ),
- #"展开的“拆”" = Table.ExpandTableColumn(已添加自定义, "拆", {"Start", "End"}, {"Start", "End"}),
- 删除的列 = Table.RemoveColumns(#"展开的“拆”", {"Materialflow"})
- in
- 删除的列
复制代码 |