
这里有165个值,它们用逗号分隔。此步骤称为CommaSeperated

workItemList是一个函数,它从CommaSeperated中获取值,并在此处调出表格
我想将CommaSeparated中的165个条目分成100个一批,并为每批调用workItemList。有没有关于如何做的想法?
发布于 2020-11-26 15:09:26
我已经设法将逗号分隔的文本字符串转换为包含100个字符的分组表。
第一个100称为" 100“,下一个100称为"200”,从101开始。
以下是我的步骤enter image description here
首先,我使用逗号作为分隔符标记,使用for each选项将文本字符串拆分为多个列。
然后,我将整个内容转换到一个列中。添加索引。加一个模数为100
添加自定义列"100counter":=Table.AddColumn(#“插入的模”,"100counter",每个if Modulus=99 then Indeks+1 else null)
忘记重命名的列步骤:D
首先使用填充,因为to初始0-100的模数将为"null“。使用Fill down second,因为如果最后一条记录不是精确地在99结束,那么它可能是null。
按“100计数器”分组,所有行。
简略代码-我清理了split by delimiter步骤中的1700列:
let
Source = Excel.CurrentWorkbook(){[Name="Tabel2"]}[Content],
#"Split Column by Delimiter" = //Alot of spam code here which is essentially just alll the columns being split. Mark ALL, choose split columns by delimiter, choose comma and all.
#"Transposed Table" = Table.Transpose(#"Split Column by Delimiter"),
#"Added Index" = Table.AddIndexColumn(#"Transposed Table", "Indeks", 0, 1),
#"Inserted Modulo" = Table.AddColumn(#"Added Index", "Modulus", each Number.Mod([Indeks], 100), type number),
#"Added Custom" = Table.AddColumn(#"Inserted Modulo", "100counter", each if [Modulus]=99 then [Indeks]+1 else null),
#"Filled Up" = Table.FillUp(#"Added Custom",{"100counter"}),
#"Filled Down" = Table.FillDown(#"Filled Up",{"100counter"}),
#"Grouped Rows" = Table.Group(#"Filled Down", {"100counter"}, {{"Antal", each _, type table [Column1=number, Indeks=number, Modulus=number, 100counter=number]}})在#“分组行”中
https://stackoverflow.com/questions/64982397
复制相似问题