跳至主要内容

Table.ColumnsOfType

傳回符合指定類型的資料行名稱清單。

Syntax

Table.ColumnsOfType(
table as table,
listOfTypes as list
) as list

Remarks

傳回符合 listOfTypes 中指定類型的資料表 table 中資料行的名稱清單。

Examples

Example #1

傳回資料表中 Number.Type 類型的資料行名稱。

Table.ColumnsOfType(
Table.FromRecords(
{[a = 1, b = "hello"]},
type table[a = Number.Type, b = Text.Type]
),
{type number}
)

Result:

{"a"}

Category

Table.Column operations