Syntax
#table(columns as any, rows as any) as any
About
从 columns 和 rows.. 创建表值。 该值 columns 可以是列名、表类型、列数或 null 的列表。 该值 rows 是列表列表,其中每个元素都包含单个行的列值。
示例 1
创建空表。
用法
#table({}, {})
输出
#table({}, {})
示例 2
通过推断第一行中的列数来创建表。
用法
#table(null, {{"Betty", 90.3}, {"Carl", 89.5}})
输出
#table({"Column1", "Column2"}, {{"Betty", 90.3}, {"Carl", 89.5}})
示例 3
通过指定列数来创建表。
用法
#table(2, {{"Betty", 90.3}, {"Carl", 89.5}})
输出
#table({"Column1", "Column2"}, {{"Betty", 90.3}, {"Carl", 89.5}})
示例 4
通过提供列名列表来创建表。
用法
#table({"Name", "Score"}, {{"Betty", 90.3}, {"Carl", 89.5}})
输出
#table({"Name", "Score"}, {{"Betty", 90.3}, {"Carl", 89.5}})
示例 5
创建具有显式类型的表。
用法
#table(type table [Name = text, Score = number], {{"Betty", 90.3}, {"Carl", 89.5}})
输出
#table(type table [Name = text, Score = number], {{"Betty", 90.3}, {"Carl", 89.5}})