Sheet kit command

cell.set

Enter Cell

Enters text, a number or a =formula into one cell, addressed by A1 cell or a static single-cell defined name in name, as typing would; use range.setValues for many cells at once.

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

Parameters

Parameters of cell.set
NameTypeRequiredDescription
arraybooleanno
cellstringnolike B2
expandbooleannoan entry right under or right of a table makes it larger; default true, false for what Insert put in: a function, a symbol
inputstringnolike text, number or =formula
namestringnolike static single-cell defined name, instead of cell
runsobject[]noa text's rich text runs, as cell.get answers them
sheetinteger | stringno
widenbooleannoas typing does: a column of the default width widens so the date or number entered shows in full instead of #### or scientific notation; default false

Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: array, cell, expand, input, name, runs, sheet, widen. 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": {
    "array": {
      "type": "boolean"
    },
    "cell": {
      "description": "like B2",
      "type": "string"
    },
    "expand": {
      "description": "an entry right under or right of a table makes it larger; default true, false for what Insert put in: a function, a symbol",
      "type": "boolean"
    },
    "input": {
      "description": "like text, number or =formula",
      "type": "string"
    },
    "name": {
      "description": "like static single-cell defined name, instead of cell",
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Name"
      ]
    },
    "runs": {
      "description": "a text's rich text runs, as cell.get answers them",
      "items": {
        "additionalProperties": true,
        "properties": {
          "font": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "sheet": {
      "oneOf": [
        {
          "description": "a sheet position counted from 0",
          "type": "integer"
        },
        {
          "description": "a sheet name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Sheet"
      ]
    },
    "widen": {
      "description": "as typing does: a column of the default width widens so the date or number entered shows in full instead of #### or scientific notation; default false",
      "type": "boolean"
    }
  },
  "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.