共用方式為


Table.ReplaceRows

語法

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

關於

count 之後開始,以指定的 table 取代輸入 rows 中的指定數量的資料列 offsetrows 參數是記錄的清單。

  • table: 執行取代的資料表。
  • offset: 在進行取代之前要略過的行數。
  • count: 要取代的資料列數目。
  • rows: 要將資料列記錄清單插入到tableoffset所指定的位置。

範例 1

從第 1 個位置開始,替換 3 行。

使用方式

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

輸出

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