Table.InsertRows
Table.InsertRows(table as table, offset as number, rows as list) as table
Retourneert een tabel met de lijst met rijen, rows
, ingevoegd in de table
op de opgegeven positie, offset
. Elke kolom in de rij die moet worden ingevoegd, moet overeenkomen met de kolomtypen van de tabel.
Voeg de rij in de tabel op positie 1 in.
Gebruik
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"]}
)
uitvoer
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"]
})
Voeg twee rijen in de tabel in op positie 1.
Gebruik
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"]
}
)
uitvoer
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})