Table.InsertRows
Inserta una lista de filas en la tabla en la posición especificada.
Syntax
Table.InsertRows(
table as table,
offset as number,
rows as list
) as table
Remarks
Devuelve una tabla con la lista de filas, rows, insertadas en la table en la posición, offset dada. Cada columna de la fila para insertar coincide con los tipos de columna de la tabla.
Examples
Example #1
Insertar la fila en la tabla en la posición 1.
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"]}
)
Result:
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"]
})
Example #2
Insertar las dos filas en la tabla en la posición 1.
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"]
}
)
Result:
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Category
Table.Row operations