Sheet kit command
file.printPreview
Print Preview
Answers the printed pages (sheet, range, rows, columns, scale, paper) and, for one page, its picture, without printing.
- Kit
- Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb))
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
fitToPage | boolean | no | |
page | integer | no | 1-based |
range | string | no | cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection |
sheets | "active" | "all" | no |
Call through sheet_run
text
sheet_run {
"path": "<file>.xlsx",
"steps": [{ "command": "file.printPreview" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: fitToPage, page, range, sheets. sheet_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
pageList | object[] | no | |
pages | number | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"pageList": {
"items": {
"additionalProperties": true,
"properties": {
"columns": {
"type": "string"
},
"height": {
"type": "number"
},
"orientation": {
"type": "string"
},
"page": {
"type": "number"
},
"paper": {
"type": "string"
},
"range": {
"type": "string"
},
"rows": {
"type": "string"
},
"scale": {
"type": "number"
},
"sheet": {
"type": "string"
},
"width": {
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"pages": {
"type": "number"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"fitToPage": {
"type": "boolean"
},
"page": {
"description": "1-based",
"type": "integer"
},
"range": {
"description": "cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection",
"type": "string"
},
"sheets": {
"enum": [
"active",
"all"
],
"type": "string"
}
},
"returns": "{pages, pageList: [{page, sheet, range, rows, columns, scale, paper, orientation, width, height}]}",
"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.