Sheet kit command

column.setWidth

Column Width

Sets the width of columns given as a column span such as B:D, one column such as C, or a list such as A,C:D (default: the selection's columns), in points or in characters.

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

Parameters

Parameters of column.setWidth
NameTypeRequiredDescription
charsnumbernoone of several alternative parameters
colsstringnocolumns: a span such as B:D, one column such as C, or a list such as A,C:D; default: the selection's columns
sheetanynoname | index
widthnumbernopoints

Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: chars, cols, sheet, width. sheet_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": {
    "chars": {
      "default": 8.43,
      "description": "one of several alternative parameters",
      "type": "number"
    },
    "cols": {
      "description": "columns: a span such as B:D, one column such as C, or a list such as A,C:D; default: the selection's columns",
      "type": "string"
    },
    "sheet": {
      "description": "name | index",
      "x-khp-name": "name",
      "x-khp-types": [
        "Sheet"
      ]
    },
    "width": {
      "description": "points",
      "type": "number"
    }
  },
  "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.