Table.InsertRows
Table.InsertRows(table as table, offset as number, rows as list) as table
Mengembalikan tabel dengan daftar baris, rows
, yang disisipkan ke dalam table
pada posisi yang diberikan, offset
. Setiap kolom dalam baris yang akan disisipkan harus cocok dengan tipe kolom tabel.
Sisipkan baris ke dalam tabel pada posisi 1.
Penggunaan
Table.InsertRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"]
}),
1,
{[CustomerID = 3, Name = "Paul", Phone = "543-7890"]}
)
Hasil
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"]
})
Sisipkan dua baris ke dalam tabel pada posisi 1.
Penggunaan
Table.InsertRows(
Table.FromRecords({[CustomerID = 1, Name = "Bob", Phone = "123-4567"]}),
1,
{
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
}
)
Hasil
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})