Table.Range
语法
Table.Range(table as table, offset as number, optional count as nullable number) as table
关于
从以指定 offset
开始的 table
返回行。 可选参数 count
指定要返回的行数。 默认情况下,返回偏移量后的所有行。
示例 1
返回表中以偏移量 1 开始的所有行。
使用情况
Table.Range(
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 = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})
示例 2
返回表中以偏移量 1 开始的一行。
使用情况
Table.Range(
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,
1
)
输出
Table.FromRecords({[CustomerID = 2, Name = "Jim", Phone = "987-6543"]})