Ana içeriğe geç

Table.InsertRows

Bir tabloya belirtilen konumda bir satır listesi ekler.

Syntax

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

Remarks

rows verilen konumunda table içine eklenen offset satır listesini içeren bir tablo döndürür. Eklenecek satırdaki her sütun, tablonun sütun türleri ile eşleşmelidir.

Examples

Example #1

Satırı 1 konumunda bulunan tabloya ekler.

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

1 konumunda bulunan tabloya iki satır ekler.

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