Sheet kit command
sheet.read
Read Range
Answers the values of a range (default: the sheet's used range) as rows, with formulas or display text instead of values when asked; the way to read data.
- Kit
- Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb))
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
formatted | boolean | no | |
formulas | boolean | no | |
range | string | no | like A1:D10; default: used range |
sheet | integer | string | no |
Call through sheet_run
text
sheet_run {
"path": "<file>.xlsx",
"steps": [{ "command": "sheet.read" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: formatted, formulas, range, sheet. sheet_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
range | string | no | |
sheet | string | no | |
values | any[][] | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"range": {
"type": "string"
},
"sheet": {
"type": "string"
},
"values": {
"items": {
"items": {},
"type": "array"
},
"type": "array"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"formatted": {
"type": "boolean"
},
"formulas": {
"type": "boolean"
},
"range": {
"description": "like A1:D10; default: used range",
"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": "rows of values",
"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.