Table.ReplaceRows

構文

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

バージョン情報

指定された rows を含む入力 table 内で、指定された行の数 countoffset の後から置換します。 rows パラメーターはレコードの一覧です。

  • table:置換が実行されるテーブル。
  • offset:置換を行う前にスキップする行の数。
  • count:置換する行の数。
  • rows:offset によって指定された場所にある table に挿入する行レコードの一覧。

例 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]
})