2. DATATABLE
A. Syntax
DataTable ( <name>, <type> [, <name>, <type> [, … ] ], <data> )
position | function | description |
---|---|---|
The first parameter | ColumnName1 | You can duplicate column names |
The second parameter | DataType1 | Data types may be repeated |
Third parameter | Data | Data values used as a set of {} represents a row of data |
B. Return
Table - constructed table
C. Notes
- Data types (integer INTEGER, high-precision digital DOUBLE, String String, logic BOOLEAN, currency CURRENCY, DATETIME date and time, etc.)
- Specific configuration formula
DataTable("字段名1",数据类型,
"字段名2",数据类型,
{
{列1行1值,列2行1值,},
{列1行2值,列2行2值}
}
)
D. Role
Returns the table constructed
E. Case
DataTable (
"姓名", String,
"学科", String,
"成绩", Currency,
{
{ "张三", "数学", 100 },
{ "李四", "语文", 90 },
{ "王五", "英语", 80 }
}
)
Reproduced in: https: //www.jianshu.com/p/fd3a2f401e66