Table.ReplaceRows

About

Returns a table where the rows beginning at an offset and continuing for count are replaced with the provided rows.

Syntax

Table.ReplaceRows(table as table, offset as number, count as number, rows as list) as table  

Arguments

Argument Description
table The Table to modify.
offset The beginning row index.
count The number of rows to replace.
rows The List of replacement rows.

Remarks

  • Table.ReplaceRows is similar to List.ReplaceRange but requires a table as input.

Example

Table.ReplaceRows(Table.FromRecords({[Column1=1], [Column1=2], [Column1=3], [Column1=4], [Column1=5]}), 1, 3, {[Column1=6], [Column1=7]})  
Column1
1
6
7
5