Sheet kit command

table.styles

Table Styles Gallery

Answers the table style gallery: the theme colours (Text 1, Accent 1–6), the built-in styles in light, medium and dark groups for one of them with a 5×5 preview each, the workbook's own styles, the default style, the active table's style, and the range Format as Table would take.

Kit
Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb))
Changes the document
no

Parameters

Parameters of table.styles
NameTypeRequiredDescription
slotintegernothe gallery's theme colour: 0 Text 1, 1–6 Accent 1–6; default: the active table's, else Accent 1

Call through sheet_run

text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "table.styles" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: slot. sheet_run answers the step’s result in completed[i].result.

Result

Result of table.styles
NameTypeRequiredDescription
colorsany[]no
currentnull | stringno
customany[]no
defaultstringno
groupsany[]no
rangenull | stringno
slotintegerno
tablenull | stringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "colors": {
      "type": "array"
    },
    "current": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "custom": {
      "type": "array"
    },
    "default": {
      "type": "string"
    },
    "groups": {
      "type": "array"
    },
    "range": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "slot": {
      "type": "integer"
    },
    "table": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "slot": {
      "description": "the gallery's theme colour: 0 Text 1, 1–6 Accent 1–6; default: the active table's, else Accent 1",
      "type": "integer"
    }
  },
  "returns": "{slot, colors, groups: [{id: light|medium|dark, styles: [{name, preview}]}], custom: [{name, preview, elements}], default, current, table, range}",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (sheet_commands through @kition/[email protected], built from KitionAI/kition-sheet@82f13b2). As data: commands.jsonl.