Table.ReplaceRows
แทนที่ช่วงแถวที่ระบุด้วยแถวที่กำหนดให้
Syntax
Table.ReplaceRows(
table as table,
offset as number,
count as number,
rows as list
) as table
Remarks
แทนที่จำนวนแถวที่ระบุ count ในค่าที่ป้อน table ด้วย rows ที่ระบุโดยเริ่มต้นหลัง offset พารามิเตอร์ rows คือรายการระเบียน
table: ตารางที่จะดำเนินการแทนที่offset: จำนวนแถวที่จะข้ามก่อนทำการแทนที่count: จำนวนแถวที่จะแทนที่rows: รายการของระเบียนแถวที่จะแทรกลงในtableในตำแหน่งที่ระบุโดยoffset
Examples
Example #1
เริ่มต้นที่ตำแหน่ง 1 แทนที่ 3 แถว
Table.ReplaceRows(
Table.FromRecords({
[Column1 = 1],
[Column1 = 2],
[Column1 = 3],
[Column1 = 4],
[Column1 = 5]
}),
1,
3,
{[Column1 = 6], [Column1 = 7]}
)
Result:
Table.FromRecords({
[Column1 = 1],
[Column1 = 6],
[Column1 = 7],
[Column1 = 5]
})
Category
Table.Row operations