Sheet kit command

edit.find

Find

Finds cells whose formulas or values contain (or equal) a text and answers their addresses; nothing is changed. Use all to list every match.

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

Parameters

Parameters of edit.find
NameTypeRequiredDescription
allbooleanno
backwardbooleannofind the hit before the active cell (Find Previous), the last one past the start
byColumnsbooleanno
lookIn"formulas" | "values"no
matchCasebooleanno
whatstringno
wholeCellbooleanno
within"sheet" | "workbook"no

Call through sheet_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: all, backward, byColumns, lookIn, matchCase, what, wholeCell, within. sheet_run answers the step’s result in completed[i].result.

Result

Result of edit.find
NameTypeRequiredDescription
countnumberno
resultsobject[]no
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "count": {
      "type": "number"
    },
    "results": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "cell": {
            "type": "string"
          },
          "sheet": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "all": {
      "type": "boolean"
    },
    "backward": {
      "description": "find the hit before the active cell (Find Previous), the last one past the start",
      "type": "boolean"
    },
    "byColumns": {
      "type": "boolean"
    },
    "lookIn": {
      "enum": [
        "formulas",
        "values"
      ],
      "type": "string"
    },
    "matchCase": {
      "type": "boolean"
    },
    "what": {
      "type": "string"
    },
    "wholeCell": {
      "type": "boolean"
    },
    "within": {
      "enum": [
        "sheet",
        "workbook"
      ],
      "type": "string"
    }
  },
  "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.