Table.RemoveRows
Table.RemoveRows(table as table, offset as number, optional count as nullable number) as table
Καταργεί count
γραμμών από την αρχή του table
, ξεκινώντας από τις καθορισμένες offset
. Χρησιμοποιείται ένα προεπιλεγμένο πλήθος 1 εάν δεν παρέχεται η παράμετρος count
.
Καταργήστε την πρώτη γραμμή από τον πίνακα.
χρήσης
Table.RemoveRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
0
)
εξόδου
Table.FromRecords({
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})
Καταργήστε τη γραμμή στη θέση 1 του πίνακα.
χρήσης
Table.RemoveRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
1
)
εξόδου
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})
Καταργήστε δύο γραμμές ξεκινώντας από τη θέση 1 του πίνακα.
χρήσης
Table.RemoveRows(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
1,
2
)
εξόδου
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})