Ugrás a fő tartalomhoz

Table.InsertRows

Sorok listáját szúrja be egy táblába a megadott helyen.

Syntax

Table.InsertRows(
table as table,
offset as number,
rows as list
) as table

Remarks

Egy táblát ad vissza a sorok rows listájával, beszúrva a(z) table táblába a megadott offset helyen. A beszúrandó sor minden oszlopának meg kell felelnie a tábla oszloptípusának.

Examples

Example #1

Beszúrja a sort a táblában az 1. pozícióba.

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

Beszúr két sort a táblában az 1. pozícióba.

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