Skip to content

Grist

介绍

Grist 是一款开源表格软件,支持云服务、自部署,官网 https://www.getgrist.com/

访问 https://docs.getgrist.com/account ,设置 Language 为简体中文。

免费用户每文档,限制记录数量 5000 ,限制大小 10 MB ,限制附件 1 GB 。

付费方面,30 天试用,购买一个月服务 10 美元,购买一年服务 96 美元。付费用户,每文档限制记录数量 10 万。

操作

数据库是先设置表的字段类型,再插入记录,以保证数据完备性。表格每个单元格的数据类型是独立的,方便排版布局,完备性存疑。

Grist 文档 Table1 ,默认有 3 个字段 A、 B、 C 和 1 个空行,字段类型为 Any ,用户输入 Hello ,字段类型就转化为 Text ,用户输入 2049-10-01 ,字段类型就转化为 Date ,也可以手动设置数据类型。新增字段, column with any、 column with type 或者 formula column ,之间是可以转换的。

其底层为 Python ,上层兼容 Excel 风格公式,即能写公式,也能写 Python 代码。 Grist 具备强大开发能力的同时,也容易造成选择困难和编程混乱。

Python 风格公式。

import datetime

datetime.datetime.now()
2049-10-01 04:00:00.00000

Excel 风格公式。

NOW()
2049-10-01 12:00:00.00000+08:00

新增:

  • page
  • wifget to page
  • empty table

访问 API 控制台,加载 https://raw.githubusercontent.com/gristlabs/grist-help/master/api/grist.yml

curl -X 'GET' \
  'https://docs.getgrist.com/api/docs/abc123/tables/Table1/records' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer XXXXXXXXXXX'
{
  "records": [
    {
      "id": 1,
      "fields": {
        "A": "Hello"
      }
    },
    {
      "id": 2,
      "fields": {
        "A": "World"
      }
    },
    {
      "id": 3,
      "fields": {
        "A": "Hi"
      }
    },
    {
      "id": 4,
      "fields": {
        "A": "Human"
      }
    }
  ]
}

联系 math@baima.site