次の方法で共有


#table

構文

#table(columns as any, rows as any) as any

詳細

columnsrows からテーブル値を作成します。 columns 値は、列名の一覧、テーブル型、列の数、または null のいずれかにできます。 rows 値は一覧の一覧です。各要素には 1 行の列値が含まれています。

例 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}})