Doc kit command

table.setStyle

Modify Table Style

Changes a table style's name, base style or region formatting; default: the current table's style.

Kit
Doc 0.1.0 (.docx)
Changes the document
yes

Parameters

Parameters of table.setStyle
NameTypeRequiredDescription
applybooleanno
bandSizeintegernorows per band
bandedColumnsobjectnoa table style region's shortcuts
bandedRowsobjectnoa table style region's shortcuts
basedOnstringno
firstColumnobjectnoa table style region's shortcuts
headerRowobjectnoa table style region's shortcuts
lastColumnobjectnoa table style region's shortcuts
lastRowobjectnoa table style region's shortcuts
namestringno
paraobjectnoparagraph properties as paragraph.dialog answers them (alignment, indents, spacing…)
stylestringnodefault: the current table's
wholeTableobjectnoa table style region's shortcuts

Call through doc_run

text
doc_run {
  "path": "<file>.docx",
  "steps": [{ "command": "table.setStyle" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: apply, bandSize, bandedColumns, bandedRows, basedOn, firstColumn, headerRow, lastColumn, lastRow, name, para, style, wholeTable. doc_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "apply": {
      "type": "boolean"
    },
    "bandSize": {
      "description": "rows per band",
      "type": "integer"
    },
    "bandedColumns": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "bandedRows": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "basedOn": {
      "type": "string"
    },
    "firstColumn": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "headerRow": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "lastColumn": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "lastRow": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "para": {
      "additionalProperties": true,
      "description": "paragraph properties as paragraph.dialog answers them (alignment, indents, spacing…)",
      "type": "object"
    },
    "style": {
      "description": "default: the current table's",
      "type": "string"
    },
    "wholeTable": {
      "additionalProperties": true,
      "description": "a table style region's shortcuts",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "borderColor": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "borderWidth": {
          "description": "points",
          "type": "number"
        },
        "borders": {
          "description": "true: single lines, false: none, null: inherit",
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "color": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "fill": {
          "oneOf": [
            {
              "description": "RRGGBB",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "font": {
          "type": "string"
        },
        "italic": {
          "type": "boolean"
        },
        "size": {
          "description": "points",
          "type": "number"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (doc_commands through @kition/[email protected], built from KitionAI/kition-doc@41e14a8). As data: commands.jsonl.