Sheet kit command

cell.get

Get Cell

Answers everything about one cell: its value, formula, display text, style, merge, comment, note and link.

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

Parameters

Parameters of cell.get
NameTypeRequiredDescription
cellstringnoone cell in A1 notation such as B2; default: the active cell
sheetinteger | stringno

Call through sheet_run

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

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

Result

Result of cell.get
NameTypeRequiredDescription
cellstringno
commentanyno
formulaanyno
hyperlinkanyno
inputstringno
mergeanyno
pictureanyno
runsanyno
spillanyno
spilledFromanyno
styleobjectno
textstringno
typestringno
valuestringno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "cell": {
      "type": "string"
    },
    "comment": {},
    "formula": {},
    "hyperlink": {},
    "input": {
      "type": "string"
    },
    "merge": {},
    "picture": {},
    "runs": {},
    "spill": {},
    "spilledFrom": {},
    "style": {
      "additionalProperties": true,
      "properties": {
        "align": {
          "additionalProperties": true,
          "properties": {
            "h": {
              "type": "string"
            },
            "indent": {
              "type": "number"
            },
            "rotation": {
              "type": "number"
            },
            "shrink": {
              "type": "boolean"
            },
            "v": {
              "type": "string"
            },
            "wrap": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "borders": {
          "additionalProperties": true,
          "properties": {
            "bottom": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "diag_down": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "diag_up": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "left": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "right": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "top": {
              "additionalProperties": true,
              "properties": {
                "color": {
                  "type": "string"
                },
                "style": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          "type": "object"
        },
        "fill": {
          "additionalProperties": true,
          "properties": {
            "bg": {
              "type": "string"
            },
            "fg": {
              "type": "string"
            },
            "pattern": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "font": {
          "additionalProperties": true,
          "properties": {
            "bold": {
              "type": "boolean"
            },
            "color": {
              "type": "string"
            },
            "italic": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "size": {
              "type": "number"
            },
            "strike": {
              "type": "boolean"
            },
            "underline": {
              "type": "string"
            },
            "vert": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "num_fmt": {
          "type": "string"
        },
        "protection": {
          "additionalProperties": true,
          "properties": {
            "hidden": {
              "type": "boolean"
            },
            "locked": {
              "type": "boolean"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "text": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "value": {
      "type": "string"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "cell": {
      "description": "one cell in A1 notation such as B2; default: the active cell",
      "type": "string"
    },
    "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"
      ]
    }
  },
  "returns": "value, formula, display text, style, comment, link",
  "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.