Table.FromRecords
Table.FromRecords(records as list, optional columns as any, optional missingField as nullable number) as table
Konvertuje records
zoznam záznamov na tabuľku.
Vytvorte tabuľku zo záznamov, ak ako názvy stĺpcov použijete názvy polí záznamov.
Použitie
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Výkon
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Vytvorte tabuľku zo záznamov so zadanými stĺpcami a vyberte počet stĺpcov.
Použitie
Table.ColumnsOfType(
Table.FromRecords(
{[CustomerID = 1, Name = "Bob"]},
type table[CustomerID = Number.Type, Name = Text.Type]
),
{type number}
)
Výkon
{"CustomerID"}