@kitionstage/sdk 0.0.0-stage → 0.5.2-stage.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -2
- package/dist/LICENSE +177 -0
- package/dist/THIRD_PARTY_NOTICES +28 -0
- package/dist/lib/assets/kitEngine.worker-3iMvwtlI.js +12732 -0
- package/dist/lib/assets/loro_wasm_bg-Gulzks_0.wasm +0 -0
- package/dist/lib/chunks/batch-BWpAyHvP.js +789 -0
- package/dist/lib/chunks/canonical-BIWfVCL-.js +87 -0
- package/dist/lib/chunks/envelope-D6MGY-ZN.js +61 -0
- package/dist/lib/chunks/replica-D8w3I4sn.js +2472 -0
- package/dist/lib/chunks/runtime-BVJHE1Pg.js +997 -0
- package/dist/lib/chunks/session-BqXC9a1-.js +281 -0
- package/dist/lib/chunks/toolIds-BCeSGHpV.js +821 -0
- package/dist/lib/chunks/workspaceTree-Destqupf.js +23 -0
- package/dist/lib/convergence/index.js +1035 -0
- package/dist/lib/convergence/node.js +8 -0
- package/dist/lib/embed-server/callbacks.js +37 -0
- package/dist/lib/embed-server/cli.js +19 -0
- package/dist/lib/embed-server/index.js +272 -0
- package/dist/lib/extensions/index.js +439 -0
- package/dist/lib/extensions/panel.html +208 -0
- package/dist/lib/extensions/runtime.js +198 -0
- package/dist/lib/extensions/sandbox.html +35 -0
- package/dist/lib/kdm/index.js +437 -0
- package/dist/lib/kit-dev-host/checkUiIds.mjs +44 -0
- package/dist/lib/kit-dev-host/index.js +308 -0
- package/dist/lib/kit-dev-host/lineRow.mjs +47 -0
- package/dist/lib/kit-dev-host/modeSmoke.mjs +178 -0
- package/dist/lib/kit-editor/index.js +6481 -0
- package/dist/lib/kit-editor/styles.css +807 -0
- package/dist/lib/kit-editor/workspaceTree.js +1 -0
- package/dist/lib/kit-engine/index.js +7 -0
- package/dist/lib/kit-host/index.js +530 -0
- package/dist/lib/kit-ui-protocol/index.js +336 -0
- package/dist/lib/node-only/embed-server-callbacks.js +2 -0
- package/dist/lib/node-only/embed-server.js +2 -0
- package/dist/lib/sync/index.js +1008 -0
- package/dist/lib/sync/openToken.js +201 -0
- package/dist/lib/sync/replicaVersions.js +51 -0
- package/dist/standalone/chunks/batch-CAGYk6m4.js +789 -0
- package/dist/standalone/chunks/client-B9xkOcvf.js +772 -0
- package/dist/standalone/chunks/collab-CTQZ9h7J.js +1022 -0
- package/dist/standalone/chunks/comment-Ds9t8xSE.js +94 -0
- package/dist/standalone/chunks/comments-uVDS8Wxp.js +41 -0
- package/dist/standalone/chunks/document-B5MMuYyN.js +324 -0
- package/dist/standalone/chunks/envelope-GX4Cynkx.js +7612 -0
- package/dist/standalone/chunks/index-BEgEEnhU.js +287 -0
- package/dist/standalone/chunks/index-EEl8hGbP.js +1967 -0
- package/dist/standalone/chunks/kits-Cp51mDlw.js +9 -0
- package/dist/standalone/chunks/replica-Di2iCPiD.js +3281 -0
- package/dist/standalone/chunks/replicaVersions-C3rJxnk9.js +50 -0
- package/dist/standalone/chunks/touched-T9jKJjxn.js +78 -0
- package/dist/standalone/index.js +12 -0
- package/dist/standalone/script/index.js +339 -0
- package/dist/standalone/script/kits/board.js +5 -0
- package/dist/standalone/script/kits/cad.js +5 -0
- package/dist/standalone/script/kits/design.js +5 -0
- package/dist/standalone/script/kits/doc.js +5 -0
- package/dist/standalone/script/kits/film.js +5 -0
- package/dist/standalone/script/kits/html.js +5 -0
- package/dist/standalone/script/kits/index.js +38 -0
- package/dist/standalone/script/kits/layout.js +5 -0
- package/dist/standalone/script/kits/motion.js +5 -0
- package/dist/standalone/script/kits/note.js +5 -0
- package/dist/standalone/script/kits/pdf.js +5 -0
- package/dist/standalone/script/kits/photo.js +5 -0
- package/dist/standalone/script/kits/scene.js +5 -0
- package/dist/standalone/script/kits/sheet.js +5 -0
- package/dist/standalone/script/kits/slide.js +5 -0
- package/dist/standalone/script/kits/table.js +5 -0
- package/dist/standalone/script/kits/vector.js +5 -0
- package/dist/standalone/script/node.js +401 -0
- package/dist/standalone/script/proxy.js +254 -0
- package/dist/types/convergence/src/adapter.d.ts +131 -0
- package/dist/types/convergence/src/engine.d.ts +66 -0
- package/dist/types/convergence/src/index.d.ts +21 -0
- package/dist/types/convergence/src/net.d.ts +52 -0
- package/dist/types/convergence/src/node.d.ts +6 -0
- package/dist/types/convergence/src/report.d.ts +56 -0
- package/dist/types/convergence/src/rng.d.ts +12 -0
- package/dist/types/convergence/src/scenarios.d.ts +15 -0
- package/dist/types/convergence/src/state.d.ts +67 -0
- package/dist/types/embed/src/agent.d.ts +88 -0
- package/dist/types/embed/src/blobs.d.ts +2 -0
- package/dist/types/embed/src/collab.d.ts +250 -0
- package/dist/types/embed/src/comments.d.ts +30 -0
- package/dist/types/embed/src/errors.d.ts +24 -0
- package/dist/types/embed/src/handlers.d.ts +92 -0
- package/dist/types/embed/src/index.d.ts +20 -0
- package/dist/types/embed/src/mount.d.ts +39 -0
- package/dist/types/embed/src/replicaStore.d.ts +3 -0
- package/dist/types/embed/src/rooms.d.ts +40 -0
- package/dist/types/embed/src/schemas.d.ts +7 -0
- package/dist/types/embed/src/syncClients.d.ts +28 -0
- package/dist/types/embed/src/theme.d.ts +7 -0
- package/dist/types/embed/src/types.d.ts +596 -0
- package/dist/types/embed/src/ui.d.ts +33 -0
- package/dist/types/embed/src/version.d.ts +2 -0
- package/dist/types/embed-server/src/callbacks.d.ts +30 -0
- package/dist/types/embed-server/src/cli.d.ts +1 -0
- package/dist/types/embed-server/src/index.d.ts +19 -0
- package/dist/types/embed-server/src/page.d.ts +15 -0
- package/dist/types/embed-server/src/server.d.ts +39 -0
- package/dist/types/embed-server/src/session.d.ts +22 -0
- package/dist/types/extensions/src/gate.d.ts +17 -0
- package/dist/types/extensions/src/generated/runtime.d.ts +8 -0
- package/dist/types/extensions/src/host.d.ts +135 -0
- package/dist/types/extensions/src/index.d.ts +13 -0
- package/dist/types/extensions/src/manifest.d.ts +82 -0
- package/dist/types/extensions/src/protocol.d.ts +159 -0
- package/dist/types/extensions/src/rpc.d.ts +52 -0
- package/dist/types/extensions/src/runtime/document.d.ts +40 -0
- package/dist/types/extensions/src/runtime/index.d.ts +10 -0
- package/dist/types/extensions/src/runtime/panel.d.ts +19 -0
- package/dist/types/extensions/src/runtime/runtime.d.ts +54 -0
- package/dist/types/extensions/src/runtime/worker.d.ts +1 -0
- package/dist/types/extensions/src/sandbox.d.ts +41 -0
- package/dist/types/kdm/src/args.d.ts +12 -0
- package/dist/types/kdm/src/batch.d.ts +118 -0
- package/dist/types/kdm/src/canonical.d.ts +25 -0
- package/dist/types/kdm/src/comment.d.ts +114 -0
- package/dist/types/kdm/src/diff.d.ts +125 -0
- package/dist/types/kdm/src/envelope.d.ts +27 -0
- package/dist/types/kdm/src/errors.d.ts +28 -0
- package/dist/types/kdm/src/footprint.d.ts +21 -0
- package/dist/types/kdm/src/ids.d.ts +57 -0
- package/dist/types/kdm/src/index.d.ts +18 -0
- package/dist/types/kdm/src/marks.d.ts +32 -0
- package/dist/types/kdm/src/op.d.ts +124 -0
- package/dist/types/kdm/src/origin.d.ts +41 -0
- package/dist/types/kdm/src/overlay.d.ts +92 -0
- package/dist/types/kdm/src/projection.d.ts +29 -0
- package/dist/types/kdm/src/read.d.ts +90 -0
- package/dist/types/kdm/src/replica.d.ts +403 -0
- package/dist/types/kdm/src/schema.d.ts +185 -0
- package/dist/types/kdm/src/testing.d.ts +28 -0
- package/dist/types/kdm/src/toolIds.d.ts +61 -0
- package/dist/types/kdm/src/touched.d.ts +24 -0
- package/dist/types/kdm/src/tx.d.ts +215 -0
- package/dist/types/kdm/src/value.d.ts +23 -0
- package/dist/types/kit-dev-host/src/checkNoPaths.d.ts +19 -0
- package/dist/types/kit-dev-host/src/checkUiIds.d.mts +2 -0
- package/dist/types/kit-dev-host/src/index.d.ts +179 -0
- package/dist/types/kit-dev-host/src/lineRow.d.mts +14 -0
- package/dist/types/kit-dev-host/src/memoryFiles.d.ts +15 -0
- package/dist/types/kit-dev-host/src/modeSmoke.d.mts +8 -0
- package/dist/types/kit-editor/src/CommandDialog.d.ts +22 -0
- package/dist/types/kit-editor/src/CommentsPanel.d.ts +45 -0
- package/dist/types/kit-editor/src/CustomizeDialog.d.ts +32 -0
- package/dist/types/kit-editor/src/HostButtons.d.ts +11 -0
- package/dist/types/kit-editor/src/RenderFailure.d.ts +7 -0
- package/dist/types/kit-editor/src/TextSink.d.ts +6 -0
- package/dist/types/kit-editor/src/brand.d.ts +2 -0
- package/dist/types/kit-editor/src/catalogMenus.d.ts +27 -0
- package/dist/types/kit-editor/src/chart.d.ts +138 -0
- package/dist/types/kit-editor/src/conflicts.d.ts +12 -0
- package/dist/types/kit-editor/src/drawing.d.ts +83 -0
- package/dist/types/kit-editor/src/editor.d.ts +544 -0
- package/dist/types/kit-editor/src/engine/KitCanvas.d.ts +70 -0
- package/dist/types/kit-editor/src/engine/backdrop.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/createKitFile.d.ts +12 -0
- package/dist/types/kit-editor/src/engine/decorations.d.ts +14 -0
- package/dist/types/kit-editor/src/engine/engineOverlays.d.ts +197 -0
- package/dist/types/kit-editor/src/engine/engineTools.d.ts +116 -0
- package/dist/types/kit-editor/src/engine/kitDraft.d.ts +70 -0
- package/dist/types/kit-editor/src/engine/kitEngine.d.ts +390 -0
- package/dist/types/kit-editor/src/engine/kitEngine.worker.d.ts +30 -0
- package/dist/types/kit-editor/src/engine/kitHost.d.ts +41 -0
- package/dist/types/kit-editor/src/engine/kitModel.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/kitModelRunner.d.ts +99 -0
- package/dist/types/kit-editor/src/engine/kitModule.d.ts +185 -0
- package/dist/types/kit-editor/src/engine/kitShortcuts.d.ts +32 -0
- package/dist/types/kit-editor/src/engine/kitTools.d.ts +79 -0
- package/dist/types/kit-editor/src/engine/lazyFonts.d.ts +34 -0
- package/dist/types/kit-editor/src/engine/lentFiles.d.ts +29 -0
- package/dist/types/kit-editor/src/engine/rasterViewport.d.ts +178 -0
- package/dist/types/kit-editor/src/engine/readOnly.d.ts +78 -0
- package/dist/types/kit-editor/src/engine/refusal.d.ts +39 -0
- package/dist/types/kit-editor/src/engine/replica.d.ts +23 -0
- package/dist/types/kit-editor/src/engine/useKitDocument.d.ts +154 -0
- package/dist/types/kit-editor/src/engine/workerRelay.d.ts +62 -0
- package/dist/types/kit-editor/src/files.d.ts +74 -0
- package/dist/types/kit-editor/src/frame/EditorFrame.d.ts +74 -0
- package/dist/types/kit-editor/src/frame/FocusBar.d.ts +10 -0
- package/dist/types/kit-editor/src/frame/MenuNodes.d.ts +20 -0
- package/dist/types/kit-editor/src/frame/MenuRibbon.d.ts +8 -0
- package/dist/types/kit-editor/src/frame/ModeButton.d.ts +7 -0
- package/dist/types/kit-editor/src/frame/menus.d.ts +64 -0
- package/dist/types/kit-editor/src/frame/modes.d.ts +51 -0
- package/dist/types/kit-editor/src/frame/useFrameLayout.d.ts +34 -0
- package/dist/types/kit-editor/src/host.d.ts +127 -0
- package/dist/types/kit-editor/src/index.d.ts +85 -0
- package/dist/types/kit-editor/src/ink.d.ts +26 -0
- package/dist/types/kit-editor/src/lease.d.ts +53 -0
- package/dist/types/kit-editor/src/oneInFlight.d.ts +7 -0
- package/dist/types/kit-editor/src/phrases.d.ts +25 -0
- package/dist/types/kit-editor/src/presence.d.ts +79 -0
- package/dist/types/kit-editor/src/strings.d.ts +6 -0
- package/dist/types/kit-editor/src/toolIcons.d.ts +32 -0
- package/dist/types/kit-editor/src/uiCatalog.d.ts +59 -0
- package/dist/types/kit-editor/src/uiConfig.d.ts +53 -0
- package/dist/types/kit-editor/src/uiContext.d.ts +65 -0
- package/dist/types/kit-editor/src/uiStore.d.ts +20 -0
- package/dist/types/kit-editor/src/useCommentAnchors.d.ts +29 -0
- package/dist/types/kit-editor/src/useKitSession.d.ts +115 -0
- package/dist/types/kit-editor/src/workspaceTree.d.ts +5 -0
- package/dist/types/kit-engine/src/contract.d.ts +154 -0
- package/dist/types/kit-engine/src/index.d.ts +2 -0
- package/dist/types/kit-engine/src/session.d.ts +133 -0
- package/dist/types/kit-host/src/files.d.ts +163 -0
- package/dist/types/kit-host/src/index.d.ts +315 -0
- package/dist/types/kit-ui-protocol/src/index.d.ts +1145 -0
- package/dist/types/loro-crdt.d.ts +9 -0
- package/dist/types/script/kits/board.d.ts +534 -0
- package/dist/types/script/kits/cad.d.ts +2937 -0
- package/dist/types/script/kits/design.d.ts +3213 -0
- package/dist/types/script/kits/doc.d.ts +2575 -0
- package/dist/types/script/kits/film.d.ts +4067 -0
- package/dist/types/script/kits/html.d.ts +38 -0
- package/dist/types/script/kits/index.d.ts +20 -0
- package/dist/types/script/kits/layout.d.ts +3483 -0
- package/dist/types/script/kits/motion.d.ts +4826 -0
- package/dist/types/script/kits/note.d.ts +631 -0
- package/dist/types/script/kits/pdf.d.ts +829 -0
- package/dist/types/script/kits/photo.d.ts +7574 -0
- package/dist/types/script/kits/scene.d.ts +2962 -0
- package/dist/types/script/kits/sheet.d.ts +2419 -0
- package/dist/types/script/kits/slide.d.ts +1894 -0
- package/dist/types/script/kits/table.d.ts +654 -0
- package/dist/types/script/kits/vector.d.ts +5167 -0
- package/dist/types/script/src/agentRelay.d.ts +48 -0
- package/dist/types/script/src/capabilities.d.ts +21 -0
- package/dist/types/script/src/document.d.ts +87 -0
- package/dist/types/script/src/drafts.d.ts +141 -0
- package/dist/types/script/src/exchange.d.ts +30 -0
- package/dist/types/script/src/headless.d.ts +190 -0
- package/dist/types/script/src/index.d.ts +15 -0
- package/dist/types/script/src/kitModel.d.ts +17 -0
- package/dist/types/script/src/kits.d.ts +8 -0
- package/dist/types/script/src/node.d.ts +42 -0
- package/dist/types/script/src/port.d.ts +89 -0
- package/dist/types/script/src/proxy.d.ts +132 -0
- package/dist/types/script/src/room.d.ts +162 -0
- package/dist/types/script/src/sources.d.ts +73 -0
- package/dist/types/sync/src/backoff.d.ts +9 -0
- package/dist/types/sync/src/blobSection.d.ts +23 -0
- package/dist/types/sync/src/capabilities.d.ts +20 -0
- package/dist/types/sync/src/client.d.ts +253 -0
- package/dist/types/sync/src/framing.d.ts +35 -0
- package/dist/types/sync/src/hash.d.ts +2 -0
- package/dist/types/sync/src/index.d.ts +19 -0
- package/dist/types/sync/src/leases.d.ts +82 -0
- package/dist/types/sync/src/openToken.d.ts +104 -0
- package/dist/types/sync/src/protocol.d.ts +484 -0
- package/dist/types/sync/src/relay.d.ts +52 -0
- package/dist/types/sync/src/replicaVersions.d.ts +17 -0
- package/dist/types/sync/src/saveMachine.d.ts +83 -0
- package/dist/types/sync/src/saveRun.d.ts +52 -0
- package/dist/types/sync/src/transport.d.ts +19 -0
- package/package.json +229 -4
|
@@ -0,0 +1,2419 @@
|
|
|
1
|
+
import type { CommandMap, ModelDocument, ModelList, ModelMap, ModelObject, ModelText, RequestContext } from '../src/index.js';
|
|
2
|
+
import { type KitDescriptor } from '../src/kits.js';
|
|
3
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
4
|
+
[key: string]: Json;
|
|
5
|
+
};
|
|
6
|
+
type BlobRef = {
|
|
7
|
+
hash: string;
|
|
8
|
+
mime: string;
|
|
9
|
+
size: number;
|
|
10
|
+
};
|
|
11
|
+
/** kit.sheet: registered with @kition/sdk/script when this module loads. */
|
|
12
|
+
export declare const sheetKit: KitDescriptor;
|
|
13
|
+
/** The fields a new `Workbook` takes (`list.add(fields)`). */
|
|
14
|
+
export type WorkbookFields = {
|
|
15
|
+
props?: Json | null;
|
|
16
|
+
theme?: Json | null;
|
|
17
|
+
customLists?: Json | null;
|
|
18
|
+
cellStyles?: Json | null;
|
|
19
|
+
};
|
|
20
|
+
/** A `Workbook` of kit.sheet. */
|
|
21
|
+
export interface Workbook extends ModelObject {
|
|
22
|
+
/** Read-only: the kit keeps it as it is. */
|
|
23
|
+
readonly key: string | null;
|
|
24
|
+
props: Json | null;
|
|
25
|
+
theme: Json | null;
|
|
26
|
+
customLists: Json | null;
|
|
27
|
+
cellStyles: Json | null;
|
|
28
|
+
/** Read-only: the kit keeps it as it is. */
|
|
29
|
+
readonly cellStyleDefinitions: ModelMap<Json>;
|
|
30
|
+
readonly styles: ModelMap<Json>;
|
|
31
|
+
/** Read-only: the kit keeps it as it is. */
|
|
32
|
+
readonly styleObjects: ModelList<Style, StyleFields>;
|
|
33
|
+
readonly names: ModelList<Name, NameFields>;
|
|
34
|
+
readonly sheets: ModelList<Sheet, SheetFields>;
|
|
35
|
+
/** Read-only: the kit keeps it as it is. */
|
|
36
|
+
readonly axisFacts: string | null;
|
|
37
|
+
}
|
|
38
|
+
/** The fields a new `Name` takes (`list.add(fields)`). */
|
|
39
|
+
export type NameFields = {
|
|
40
|
+
name: string;
|
|
41
|
+
scope?: string | ModelObject | null;
|
|
42
|
+
formula: string;
|
|
43
|
+
props?: Json | null;
|
|
44
|
+
};
|
|
45
|
+
/** A `Name` of kit.sheet. */
|
|
46
|
+
export interface Name extends ModelObject {
|
|
47
|
+
/** Read-only: the kit keeps it as it is. */
|
|
48
|
+
readonly key: string | null;
|
|
49
|
+
name: string;
|
|
50
|
+
/** The id of a `Sheet`. */
|
|
51
|
+
get scope(): string | null;
|
|
52
|
+
set scope(value: Sheet | string | null);
|
|
53
|
+
formula: string;
|
|
54
|
+
props: Json | null;
|
|
55
|
+
}
|
|
56
|
+
/** The fields a new `Sheet` takes (`list.add(fields)`). */
|
|
57
|
+
export type SheetFields = {
|
|
58
|
+
name: string;
|
|
59
|
+
props?: Json | null;
|
|
60
|
+
features?: Json | null;
|
|
61
|
+
};
|
|
62
|
+
/** A `Sheet` of kit.sheet. */
|
|
63
|
+
export interface Sheet extends ModelObject {
|
|
64
|
+
name: string;
|
|
65
|
+
props: Json | null;
|
|
66
|
+
readonly rows: ModelList<Row, RowFields>;
|
|
67
|
+
readonly cols: ModelList<Col, ColFields>;
|
|
68
|
+
readonly cells: ModelMap<Json>;
|
|
69
|
+
readonly comments: ModelMap<Json>;
|
|
70
|
+
readonly hyperlinks: ModelMap<Json>;
|
|
71
|
+
features: Json | null;
|
|
72
|
+
/** Read-only: the kit keeps it as it is. */
|
|
73
|
+
readonly constraints: ModelMap<Json>;
|
|
74
|
+
/** Read-only: the kit keeps it as it is. */
|
|
75
|
+
readonly tableObjects: ModelList<Table, TableFields>;
|
|
76
|
+
/** Read-only: the kit keeps it as it is. */
|
|
77
|
+
readonly pivotObjects: ModelList<Pivot, PivotFields>;
|
|
78
|
+
/** Read-only: the kit keeps it as it is. */
|
|
79
|
+
readonly groups: ModelList<Group, GroupFields>;
|
|
80
|
+
readonly images: ModelList<Image, ImageFields>;
|
|
81
|
+
/** Read-only: the kit keeps it as it is. */
|
|
82
|
+
readonly shapes: ModelMap<Json>;
|
|
83
|
+
/** Read-only: the kit keeps it as it is. */
|
|
84
|
+
readonly charts: ModelMap<Json>;
|
|
85
|
+
/** Read-only: the kit keeps it as it is. */
|
|
86
|
+
readonly sheetId: number | null;
|
|
87
|
+
}
|
|
88
|
+
/** The fields a new `AxisFacts` takes (`list.add(fields)`). */
|
|
89
|
+
export type AxisFactsFields = {};
|
|
90
|
+
/** A `AxisFacts` of kit.sheet. */
|
|
91
|
+
export interface AxisFacts extends ModelObject {
|
|
92
|
+
/** Read-only: the kit keeps it as it is. */
|
|
93
|
+
readonly key: string;
|
|
94
|
+
}
|
|
95
|
+
/** The fields a new `Cell` takes (`list.add(fields)`). */
|
|
96
|
+
export type CellFields = {
|
|
97
|
+
input?: string | null;
|
|
98
|
+
style?: string | null;
|
|
99
|
+
array?: string | null;
|
|
100
|
+
picture?: Json | null;
|
|
101
|
+
merged?: Json | null;
|
|
102
|
+
};
|
|
103
|
+
/** A `Cell` of kit.sheet. */
|
|
104
|
+
export interface Cell extends ModelObject {
|
|
105
|
+
/** Read-only: the kit keeps it as it is. */
|
|
106
|
+
readonly address: string | null;
|
|
107
|
+
/** Read-only: the kit keeps it as it is. */
|
|
108
|
+
readonly label: string | null;
|
|
109
|
+
input: string | null;
|
|
110
|
+
get text(): ModelText;
|
|
111
|
+
set text(value: string);
|
|
112
|
+
style: string | null;
|
|
113
|
+
array: string | null;
|
|
114
|
+
picture: Json | null;
|
|
115
|
+
/** Read-only: the kit keeps it as it is. */
|
|
116
|
+
readonly by: string | null;
|
|
117
|
+
/** Read-only: the kit keeps it as it is. */
|
|
118
|
+
readonly key: string | null;
|
|
119
|
+
merged: Json | null;
|
|
120
|
+
}
|
|
121
|
+
/** The fields a new `Row` takes (`list.add(fields)`). */
|
|
122
|
+
export type RowFields = {
|
|
123
|
+
info?: Json | null;
|
|
124
|
+
gone?: boolean | null;
|
|
125
|
+
};
|
|
126
|
+
/** A `Row` of kit.sheet. */
|
|
127
|
+
export interface Row extends ModelObject {
|
|
128
|
+
/** Read-only: the kit keeps it as it is. */
|
|
129
|
+
readonly key: string | null;
|
|
130
|
+
/** Read-only: the kit keeps it as it is. */
|
|
131
|
+
readonly index: number | null;
|
|
132
|
+
info: Json | null;
|
|
133
|
+
gone: boolean | null;
|
|
134
|
+
}
|
|
135
|
+
/** The fields a new `Col` takes (`list.add(fields)`). */
|
|
136
|
+
export type ColFields = {
|
|
137
|
+
info?: Json | null;
|
|
138
|
+
gone?: boolean | null;
|
|
139
|
+
};
|
|
140
|
+
/** A `Col` of kit.sheet. */
|
|
141
|
+
export interface Col extends ModelObject {
|
|
142
|
+
/** Read-only: the kit keeps it as it is. */
|
|
143
|
+
readonly key: string | null;
|
|
144
|
+
/** Read-only: the kit keeps it as it is. */
|
|
145
|
+
readonly index: number | null;
|
|
146
|
+
info: Json | null;
|
|
147
|
+
gone: boolean | null;
|
|
148
|
+
}
|
|
149
|
+
/** The fields a new `Group` takes (`list.add(fields)`). */
|
|
150
|
+
export type GroupFields = {};
|
|
151
|
+
/** A `Group` of kit.sheet. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
|
|
152
|
+
export interface Group extends ModelObject {
|
|
153
|
+
/** Read-only: the kit keeps it as it is. */
|
|
154
|
+
readonly key: number;
|
|
155
|
+
/** Read-only: the kit keeps it as it is. */
|
|
156
|
+
readonly sheet: string;
|
|
157
|
+
/** Read-only: the kit keeps it as it is. */
|
|
158
|
+
readonly members: Json;
|
|
159
|
+
}
|
|
160
|
+
/** The fields a new `Table` takes (`list.add(fields)`). */
|
|
161
|
+
export type TableFields = {};
|
|
162
|
+
/** A `Table` of kit.sheet. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
|
|
163
|
+
export interface Table extends ModelObject {
|
|
164
|
+
/** Read-only: the kit keeps it as it is. */
|
|
165
|
+
readonly key: string;
|
|
166
|
+
/** Read-only: the kit keeps it as it is. */
|
|
167
|
+
readonly name: string;
|
|
168
|
+
/** Read-only: the kit keeps it as it is. */
|
|
169
|
+
readonly sheet: string;
|
|
170
|
+
/** Read-only: the kit keeps it as it is. */
|
|
171
|
+
readonly range: string;
|
|
172
|
+
/** Read-only: the kit keeps it as it is. */
|
|
173
|
+
readonly columns: Json;
|
|
174
|
+
}
|
|
175
|
+
/** The fields a new `Pivot` takes (`list.add(fields)`). */
|
|
176
|
+
export type PivotFields = {};
|
|
177
|
+
/** A `Pivot` of kit.sheet. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
|
|
178
|
+
export interface Pivot extends ModelObject {
|
|
179
|
+
/** Read-only: the kit keeps it as it is. */
|
|
180
|
+
readonly key: string;
|
|
181
|
+
/** Read-only: the kit keeps it as it is. */
|
|
182
|
+
readonly name: string;
|
|
183
|
+
/** Read-only: the kit keeps it as it is. */
|
|
184
|
+
readonly sheet: string;
|
|
185
|
+
/** Read-only: the kit keeps it as it is. */
|
|
186
|
+
readonly anchor: string;
|
|
187
|
+
/** Read-only: the kit keeps it as it is. */
|
|
188
|
+
readonly source: string;
|
|
189
|
+
}
|
|
190
|
+
/** The fields a new `Style` takes (`list.add(fields)`). */
|
|
191
|
+
export type StyleFields = {};
|
|
192
|
+
/** A `Style` of kit.sheet. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
|
|
193
|
+
export interface Style extends ModelObject {
|
|
194
|
+
/** Read-only: the kit keeps it as it is. */
|
|
195
|
+
readonly key: string;
|
|
196
|
+
/** Read-only: the kit keeps it as it is. */
|
|
197
|
+
readonly name: string | null;
|
|
198
|
+
/** Read-only: the kit keeps it as it is. */
|
|
199
|
+
readonly kind: string | null;
|
|
200
|
+
/** Read-only: the kit keeps it as it is. */
|
|
201
|
+
readonly value: Json;
|
|
202
|
+
}
|
|
203
|
+
/** The fields a new `Image` takes (`list.add(fields)`). */
|
|
204
|
+
export type ImageFields = {
|
|
205
|
+
props?: Json | null;
|
|
206
|
+
blob?: BlobRef | null;
|
|
207
|
+
};
|
|
208
|
+
/** A `Image` of kit.sheet. */
|
|
209
|
+
export interface Image extends ModelObject {
|
|
210
|
+
props: Json | null;
|
|
211
|
+
blob: BlobRef | null;
|
|
212
|
+
/** Read-only: the kit keeps it as it is. */
|
|
213
|
+
readonly key: number | null;
|
|
214
|
+
}
|
|
215
|
+
/** The fields a new `Shape` takes (`list.add(fields)`). */
|
|
216
|
+
export type ShapeFields = {
|
|
217
|
+
sheet: string | ModelObject;
|
|
218
|
+
z?: number | null;
|
|
219
|
+
frame?: Json | null;
|
|
220
|
+
props?: Json | null;
|
|
221
|
+
};
|
|
222
|
+
/** A `Shape` of kit.sheet. */
|
|
223
|
+
export interface Shape extends ModelObject {
|
|
224
|
+
/** The id of a `Sheet`. */
|
|
225
|
+
get sheet(): string;
|
|
226
|
+
set sheet(value: Sheet | string);
|
|
227
|
+
z: number | null;
|
|
228
|
+
frame: Json | null;
|
|
229
|
+
props: Json | null;
|
|
230
|
+
readonly look: ModelMap<Json>;
|
|
231
|
+
get text(): ModelText;
|
|
232
|
+
set text(value: string);
|
|
233
|
+
/** Read-only: the kit keeps it as it is. */
|
|
234
|
+
readonly key: number | null;
|
|
235
|
+
}
|
|
236
|
+
/** The fields a new `Chart` takes (`list.add(fields)`). */
|
|
237
|
+
export type ChartFields = {
|
|
238
|
+
sheet: string | ModelObject;
|
|
239
|
+
z?: number | null;
|
|
240
|
+
frame?: Json | null;
|
|
241
|
+
};
|
|
242
|
+
/** A `Chart` of kit.sheet. */
|
|
243
|
+
export interface Chart extends ModelObject {
|
|
244
|
+
/** The id of a `Sheet`. */
|
|
245
|
+
get sheet(): string;
|
|
246
|
+
set sheet(value: Sheet | string);
|
|
247
|
+
z: number | null;
|
|
248
|
+
frame: Json | null;
|
|
249
|
+
readonly parts: ModelMap<Json>;
|
|
250
|
+
/** Read-only: the kit keeps it as it is. */
|
|
251
|
+
readonly key: number | null;
|
|
252
|
+
}
|
|
253
|
+
/** Every command of kit.sheet, by id, with its parameters. */
|
|
254
|
+
export interface SheetCommands extends CommandMap {
|
|
255
|
+
/** New Workbook. Replaces the open workbook with a new one, empty or built from a sample (budget, sales, grades); use file.open to load an existing file instead. Params: {sample?: "budget"|"sales"|"grades"}. Changes the document. */
|
|
256
|
+
"file.new": {
|
|
257
|
+
sample?: "budget" | "sales" | "grades";
|
|
258
|
+
};
|
|
259
|
+
/** Open. Opens a workbook from a path or from base64 bytes (xlsx, xlsm, xlsb, ods, csv, tsv, txt, json) in place of the current one. Params: {path} | {name, base64} (xlsx, xlsm, xlsb and ods data import, csv, tsv, txt, json). Changes the document. */
|
|
260
|
+
"file.open": {
|
|
261
|
+
base64?: Json; /** in one of several forms of the parameters */
|
|
262
|
+
name?: string; /** in one of several forms of the parameters */
|
|
263
|
+
path?: Json;
|
|
264
|
+
};
|
|
265
|
+
/** Save. Saves the workbook to its path, or to the given path; the format follows the extension (xlsx by default, also csv, tsv, json, html). Params: {path?} (xlsx by default; .csv/.tsv/.json/.html by extension). Reads the part. Changes the document. */
|
|
266
|
+
"file.save": {
|
|
267
|
+
path?: Json;
|
|
268
|
+
};
|
|
269
|
+
/** Save As. Saves the workbook under a new path and makes that the workbook's path; the extension picks the format. Params: {path}. Reads the part. Changes the document. */
|
|
270
|
+
"file.saveAs": {
|
|
271
|
+
path?: Json;
|
|
272
|
+
};
|
|
273
|
+
/** Encode Workbook. Encodes the workbook without writing a file and answers it as base64 in the chosen format (xlsx, csv, tsv, json or html). Params: {format?: xlsx|csv|tsv|json|html} ? {base64}. Reads the part. */
|
|
274
|
+
"file.saveBytes": {
|
|
275
|
+
format?: string;
|
|
276
|
+
};
|
|
277
|
+
/** Close. Closes the workbook; refuses when there are unsaved changes unless force is true. Params: {force?: bool}. Changes the document. */
|
|
278
|
+
"file.close": {
|
|
279
|
+
force?: boolean;
|
|
280
|
+
};
|
|
281
|
+
/** Export as CSV. Writes one sheet (the active one by default) as CSV to a path, leaving the workbook and its path unchanged. Params: {path, sheet?, bom?: bool (UTF-8 with a byte-order mark, as Excel's and WPS's CSV UTF-8)}. Acts on `range`. Reads the part. */
|
|
282
|
+
"file.exportCsv": {
|
|
283
|
+
bom?: boolean; /** read by the command beside its listed parameters */
|
|
284
|
+
cell?: string;
|
|
285
|
+
path?: Json; /** read by the command beside its listed parameters */
|
|
286
|
+
range?: string;
|
|
287
|
+
sheet?: Json;
|
|
288
|
+
};
|
|
289
|
+
/** Save as Web Page. Writes the workbook as an HTML web page to a path, leaving the workbook and its path unchanged. Params: {path}. Acts on `range`. Reads the part. */
|
|
290
|
+
"file.exportHtml": {
|
|
291
|
+
cell?: string;
|
|
292
|
+
path?: Json; /** read by the command beside its listed parameters */
|
|
293
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
294
|
+
sheet?: Json;
|
|
295
|
+
};
|
|
296
|
+
/** Export. Answers the workbook as a PDF laid out as Print lays it out (the active sheet or all sheets, a range, fit to page), or one sheet as CSV or a web page (HTML), as base64 for the host to write as a new file; nothing is written and the workbook does not change. Params: {format: pdf|csv|html|xlsx|xltx|png, sheet? (csv, html, png: index or name; the active sheet by default), sheets?: active|all (pdf), range?: "A1:F40" (pdf, png: active sheet), fitToPage?: bool (pdf), bom?: bool (csv: UTF-8 with a byte-order mark, as Excel's and WPS's CSV UTF-8)} ? {format, extension, mime, bytes, data (base64), pages? (pdf)}; xlsx is a copy of the workbook, xltx the workbook as a template, png a picture of the sheet's cells (the kit's renderer). Acts on `range`. Reads the selection, part. */
|
|
297
|
+
"file.export": {
|
|
298
|
+
bom?: boolean; /** pdf */
|
|
299
|
+
fitToPage?: boolean;
|
|
300
|
+
format?: "pdf" | "csv" | "html" | "xlsx" | "xltx" | "png"; /** like A1:F40; pdf, png: active sheet */
|
|
301
|
+
range?: string; /** csv, html, png: index or name; the active sheet by default */
|
|
302
|
+
sheet?: Json; /** pdf */
|
|
303
|
+
sheets?: "active" | "all";
|
|
304
|
+
};
|
|
305
|
+
/** Properties. Sets the workbook's document properties (title, subject, author, company, keywords, description) that are saved with the file. Params: {title?, subject?, author?, company?, keywords?, description?}. Changes the document. */
|
|
306
|
+
"file.properties": {
|
|
307
|
+
author?: string;
|
|
308
|
+
company?: string;
|
|
309
|
+
description?: string;
|
|
310
|
+
keywords?: string;
|
|
311
|
+
subject?: string;
|
|
312
|
+
title?: string;
|
|
313
|
+
};
|
|
314
|
+
/** Switch Window. Brings the open window with the given index (from view.switchWindows) to the front. Params: {index}. */
|
|
315
|
+
"window.activate": {
|
|
316
|
+
index?: number;
|
|
317
|
+
};
|
|
318
|
+
/** 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. Params: {cell?: "B2", name?: "static single-cell defined name, instead of cell", input: "text, number or =formula", sheet?, array?: bool, runs?: [{text, font}] (a text's rich text runs, as cell.get answers them), expand?: bool (an entry right under or right of a table makes it larger; default true, false for what Insert put in: a function, a symbol)}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
319
|
+
"cell.set": {
|
|
320
|
+
array?: boolean; /** like B2 */
|
|
321
|
+
cell?: string; /** an entry right under or right of a table makes it larger; default true, false for what Insert put in: a function, a symbol */
|
|
322
|
+
expand?: boolean; /** like text, number or =formula */
|
|
323
|
+
input?: string; /** like static single-cell defined name, instead of cell */
|
|
324
|
+
name?: string; /** a text's rich text runs, as cell.get answers them */
|
|
325
|
+
runs?: Array<{
|
|
326
|
+
font?: string;
|
|
327
|
+
text?: string;
|
|
328
|
+
}>;
|
|
329
|
+
sheet?: Json;
|
|
330
|
+
};
|
|
331
|
+
/** Format Characters. Formats characters inside one text cell (bold, italic, strike, underline, font, size, colour) from start to end, leaving the rest of the cell's text as it was. Params: {cell?: "B2", sheet?, start?: 0, end?: (characters, end exclusive; the whole text by default), bold?, italic?, strike?, underline?: true|"double"|"none", vertAlign?: superscript|subscript|baseline, size?, name?, color?: "#C00000"|{theme, tint}|"auto", toggle?: bold|italic|underline|strike|superscript|subscript} ? {cell, start, end, runs}: formats part of a text cell's characters (rich text). Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
332
|
+
"cell.formatText": {
|
|
333
|
+
bold?: boolean; /** like B2 */
|
|
334
|
+
cell?: string; /** a colour such as #C00000 */
|
|
335
|
+
color?: string; /** characters, end exclusive; the whole text by default */
|
|
336
|
+
end?: number;
|
|
337
|
+
italic?: boolean;
|
|
338
|
+
name?: string;
|
|
339
|
+
sheet?: Json;
|
|
340
|
+
size?: number;
|
|
341
|
+
start?: number;
|
|
342
|
+
strike?: boolean;
|
|
343
|
+
toggle?: "bold" | "italic" | "underline" | "strike" | "superscript" | "subscript";
|
|
344
|
+
underline?: Json;
|
|
345
|
+
vertAlign?: "superscript" | "subscript" | "baseline";
|
|
346
|
+
};
|
|
347
|
+
/** Set Values. Writes a block of values starting at the range's top-left cell, one inner list per row; strings starting with = become formulas. The fastest way to fill a table. Params: {range?: "A1", values: [[...]] (rows of numbers/strings/bools/null; strings starting with = are formulas)}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
348
|
+
"range.setValues": {
|
|
349
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
350
|
+
sheet?: Json; /** rows of numbers/strings/bools/null; strings starting with = are formulas */
|
|
351
|
+
values?: Array<Array<Json>>;
|
|
352
|
+
};
|
|
353
|
+
/** Fill Range With Input. Enters the same input in every cell of the range (default: the selection). A formula is written as for the range's first cell (for the active cell when it fills the selection, like Ctrl+Enter), and its relative references move per cell: =A10+1 into A11:A69 gives =A10+1 in A11 and =A68+1 in A69. Params: {range?, input}: enters the same input in every cell of the range (default: the selection); a formula is written for the range's first cell (for the active cell when the selection is filled, like Ctrl+Enter) and its relative references move per cell. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
354
|
+
"range.fill": {
|
|
355
|
+
input?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
356
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
357
|
+
sheet?: Json;
|
|
358
|
+
};
|
|
359
|
+
/** Select. Selects cells (one range or several separated by commas) and optionally sets the active cell and sheet; answers the new selection. Params: {range: "A1:B2,D4" | cell, active?: "A1", sheet?}. Acts on `range`. Reads the selection, part. */
|
|
360
|
+
"selection.set": {
|
|
361
|
+
active?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
362
|
+
range?: string;
|
|
363
|
+
sheet?: Json;
|
|
364
|
+
};
|
|
365
|
+
/** Move Selection. Moves the active cell by rows and columns, optionally extending the selection or jumping to the data edge like Ctrl+arrow; answers the new selection. Params: {dr, dc, extend?: bool, jump?: bool (Ctrl+arrow), page?: bool}. Reads the selection, part. */
|
|
366
|
+
"selection.move": {
|
|
367
|
+
dc?: number; /** rows to move, negative moves up */
|
|
368
|
+
dr?: number;
|
|
369
|
+
extend?: boolean; /** Ctrl+arrow */
|
|
370
|
+
jump?: boolean;
|
|
371
|
+
page?: boolean;
|
|
372
|
+
};
|
|
373
|
+
/** Next Cell in Selection. Moves the active cell to the next (or previous) cell inside the current selection, as Enter or Tab does; answers the new active cell. Params: {forward?: true, byRow?: false} (Enter/Tab inside a selection). Reads the selection. */
|
|
374
|
+
"selection.next": {
|
|
375
|
+
byRow?: boolean;
|
|
376
|
+
forward?: boolean;
|
|
377
|
+
};
|
|
378
|
+
/** Select All. Selects the current region around the active cell, or the whole sheet when the region is already selected; answers the selection. Params: {} (current region first, then the whole sheet). Reads the selection, part. */
|
|
379
|
+
"edit.selectAll": Record<string, never>;
|
|
380
|
+
/** Select Current Region. Selects the block of non-empty cells around the active cell, bounded by empty rows and columns; answers the selection. Params: {}. Reads the selection, part. */
|
|
381
|
+
"selection.currentRegion": Record<string, never>;
|
|
382
|
+
/** Select Entire Row. Selects the entire rows of the current selection; answers the selection. Params: {}. Reads the selection. */
|
|
383
|
+
"selection.row": Record<string, never>;
|
|
384
|
+
/** Select Entire Column. Selects the entire columns of the current selection; answers the selection. Params: {}. Reads the selection. */
|
|
385
|
+
"selection.column": Record<string, never>;
|
|
386
|
+
/** Go To. Moves to and selects a reference: a cell or range (B5, Sheet2!A1:C3) or a defined name; answers the new selection. Params: {reference: "B5" | "Sheet2!A1:C3" | name}. Reads the selection, part. */
|
|
387
|
+
"edit.goTo": {
|
|
388
|
+
reference?: string;
|
|
389
|
+
};
|
|
390
|
+
/** Go To Special. Selects every cell of a kind (blanks, constants, formulas, comments, errors, numbers, text and more) in the selection or sheet; fails when no cell matches. Params: {kind: blanks|constants|formulas|comments|lastCell|currentRegion|visible|conditionalFormats|dataValidation|errors|numbers|text}. Reads the selection, part. */
|
|
391
|
+
"edit.goToSpecial": {
|
|
392
|
+
kind?: "blanks" | "constants" | "formulas" | "comments" | "lastCell" | "currentRegion" | "visible" | "conditionalFormats" | "dataValidation" | "errors" | "numbers" | "text";
|
|
393
|
+
};
|
|
394
|
+
/** Undo. Undoes the last steps of the caller's own scope (an agent undoes its own edits, not the person's); steps sets how many. Params: {steps?: 1, scope?: "person"|"agent"}. Reads the selection. Changes the document. */
|
|
395
|
+
"edit.undo": {
|
|
396
|
+
scope?: "person" | "agent";
|
|
397
|
+
steps?: number;
|
|
398
|
+
};
|
|
399
|
+
/** Redo. Redoes steps undone in the caller's own scope; steps sets how many. Params: {steps?: 1, scope?: "person"|"agent"}. Reads the selection. Changes the document. */
|
|
400
|
+
"edit.redo": {
|
|
401
|
+
scope?: "person" | "agent";
|
|
402
|
+
steps?: number;
|
|
403
|
+
};
|
|
404
|
+
/** Copy. Copies a range (default: the selection) to the clipboard and answers it as tab-separated text, plus styled HTML when asked; paste it with edit.paste. Params: {range?, html?: bool} ? {range, text, html?} (html: a styled HTML table, only when requested and small enough). Acts on `range`. Reads the selection, part. */
|
|
405
|
+
"edit.copy": {
|
|
406
|
+
html?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
407
|
+
range?: string;
|
|
408
|
+
};
|
|
409
|
+
/** Cut. Marks a range for moving and answers its text; the cells move when edit.paste runs. Params: {range?, html?: bool} ? {range, text, html?} (html: a styled HTML table, only when requested and small enough). Acts on `range`. Reads the selection, part. */
|
|
410
|
+
"edit.cut": {
|
|
411
|
+
html?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
412
|
+
range?: string;
|
|
413
|
+
};
|
|
414
|
+
/** Paste. Pastes the copied or cut cells at a cell (default: the active cell), or pastes the given tab-separated text. Params: {at?: "C3", text?: "tab-separated text from the system clipboard", html?: "the HTML beside it, whose first table (merged cells, line breaks in a cell, formatting, column widths) is pasted instead"}. Reads the selection, part. Changes the document. */
|
|
415
|
+
"edit.paste": {
|
|
416
|
+
at?: string; /** like the HTML beside it, whose first table (merged cells, line breaks in a cell, formatting, column widths) is pasted instead */
|
|
417
|
+
html?: string; /** read by the command beside its listed parameters */
|
|
418
|
+
sheet?: Json; /** like tab-separated text from the system clipboard */
|
|
419
|
+
text?: string;
|
|
420
|
+
};
|
|
421
|
+
/** Paste Special. Pastes only part of the copied cells (values, formulas, formats, comments, validation...), optionally combining with an arithmetic operation, skipping blanks or transposing. Params: {what: all|formulas|values|formats|comments|validation|allExceptBorders|columnWidths|formulasAndNumberFormats|valuesAndNumberFormats, operation?: none|add|subtract|multiply|divide, skipBlanks?, transpose?, link?}. Reads the selection, part. Changes the document. */
|
|
422
|
+
"edit.pasteSpecial": {
|
|
423
|
+
at?: string;
|
|
424
|
+
link?: boolean;
|
|
425
|
+
operation?: "none" | "add" | "subtract" | "multiply" | "divide"; /** read by the command beside its listed parameters */
|
|
426
|
+
sheet?: Json;
|
|
427
|
+
skipBlanks?: boolean;
|
|
428
|
+
transpose?: boolean;
|
|
429
|
+
what?: "all" | "formulas" | "values" | "formats" | "comments" | "validation" | "allExceptBorders" | "columnWidths" | "formulasAndNumberFormats" | "valuesAndNumberFormats";
|
|
430
|
+
};
|
|
431
|
+
/** Cancel Copy. Cancels the pending copy or cut so a later paste does nothing; changes no cells. Params: {}. */
|
|
432
|
+
"edit.clearClipboard": Record<string, never>;
|
|
433
|
+
/** Clear All. Clears contents, formats, comments and links from a range (default: the selection). Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
434
|
+
"edit.clearAll": {
|
|
435
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
436
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
437
|
+
sheet?: Json;
|
|
438
|
+
};
|
|
439
|
+
/** Clear Formats. Removes formatting from a range (default: the selection) and keeps its values and formulas. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
440
|
+
"edit.clearFormats": {
|
|
441
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
442
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
443
|
+
sheet?: Json;
|
|
444
|
+
};
|
|
445
|
+
/** Clear Contents. Deletes the values and formulas in a range (default: the selection) and keeps its formatting, like the Delete key. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
446
|
+
"edit.clearContents": {
|
|
447
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
448
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
449
|
+
sheet?: Json;
|
|
450
|
+
};
|
|
451
|
+
/** Clear Comments and Notes. Removes comments and notes from the cells of a range (default: the selection). Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
452
|
+
"edit.clearComments": {
|
|
453
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
454
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
455
|
+
sheet?: Json;
|
|
456
|
+
};
|
|
457
|
+
/** Clear Hyperlinks. Removes hyperlinks from the cells of a range (default: the selection) and keeps their text. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
458
|
+
"edit.clearHyperlinks": {
|
|
459
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
460
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
461
|
+
sheet?: Json;
|
|
462
|
+
};
|
|
463
|
+
/** Fill Down. Copies the top row of a range into the rows below it (Ctrl+D); formulas adjust their relative references. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
464
|
+
"edit.fillDown": {
|
|
465
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
466
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
467
|
+
sheet?: Json;
|
|
468
|
+
};
|
|
469
|
+
/** Fill Right. Copies the leftmost column of a range into the columns to its right (Ctrl+R); formulas adjust. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
470
|
+
"edit.fillRight": {
|
|
471
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
472
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
473
|
+
sheet?: Json;
|
|
474
|
+
};
|
|
475
|
+
/** Fill Up. Copies the bottom row of a range into the rows above it; formulas adjust. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
476
|
+
"edit.fillUp": {
|
|
477
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
478
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
479
|
+
sheet?: Json;
|
|
480
|
+
};
|
|
481
|
+
/** Fill Left. Copies the rightmost column of a range into the columns to its left; formulas adjust. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
482
|
+
"edit.fillLeft": {
|
|
483
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
484
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
485
|
+
sheet?: Json;
|
|
486
|
+
};
|
|
487
|
+
/** AutoFill. Extends a source range over a target range as the fill handle does: continues series (1, 2, 3...; months), or copies values or formats only. Params: {source: "A1:A2", target: "A1:A10", mode?: series|copy|formats|values}: the fill-handle drag. Reads the selection, part. Changes the document. */
|
|
488
|
+
"edit.autoFill": {
|
|
489
|
+
mode?: "series" | "copy" | "formats" | "values"; /** like A1:A2 */
|
|
490
|
+
source?: string; /** like A1:A10 */
|
|
491
|
+
target?: string;
|
|
492
|
+
};
|
|
493
|
+
/** Series. Fills a range with a linear, growth or date series from its first cell, with a step and optional stop value. Params: {range?, direction?: columns|rows, type?: linear|growth|date|autofill, step?: 1, stop?, dateUnit?: day|weekday|month|year}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
494
|
+
"edit.fillSeries": {
|
|
495
|
+
dateUnit?: "day" | "weekday" | "month" | "year";
|
|
496
|
+
direction?: "columns" | "rows"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
497
|
+
range?: string;
|
|
498
|
+
step?: number; /** the value the series stops at */
|
|
499
|
+
stop?: number;
|
|
500
|
+
type?: "linear" | "growth" | "date" | "autofill";
|
|
501
|
+
};
|
|
502
|
+
/** Smart fill. Fills the empty cells of a column from the pattern of the examples typed above them (for example first names split from full names). Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
503
|
+
"edit.smartFill": {
|
|
504
|
+
range?: string;
|
|
505
|
+
};
|
|
506
|
+
/** 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. Params: {what, matchCase?, wholeCell?, lookIn?: formulas|values, byColumns?, all?: bool, within?: sheet|workbook}. Reads the selection, part. */
|
|
507
|
+
"edit.find": {
|
|
508
|
+
all?: boolean;
|
|
509
|
+
byColumns?: boolean;
|
|
510
|
+
lookIn?: "formulas" | "values";
|
|
511
|
+
matchCase?: boolean;
|
|
512
|
+
what?: string;
|
|
513
|
+
wholeCell?: boolean;
|
|
514
|
+
within?: "sheet" | "workbook";
|
|
515
|
+
};
|
|
516
|
+
/** Replace. Replaces text in cell contents across the sheet or workbook (all matches by default) and answers how many cells changed. Params: {what, with, matchCase?, wholeCell?, all?: true, within?: sheet|workbook}. Reads the selection, part. Changes the document. */
|
|
517
|
+
"edit.replace": {
|
|
518
|
+
all?: boolean;
|
|
519
|
+
matchCase?: boolean;
|
|
520
|
+
what?: string;
|
|
521
|
+
wholeCell?: boolean;
|
|
522
|
+
with?: string;
|
|
523
|
+
within?: "sheet" | "workbook";
|
|
524
|
+
};
|
|
525
|
+
/** Format Painter. Picks up the selection's formats on the first call; a call with apply pastes those formats onto another range. Params: {sticky?: bool, apply?: "C3:D4", cancel?: bool} ? {active, sticky}: picks up the selection's formats (sticky: until cancelled, as a double-click on the button does); called again without `sticky` it puts them down, as a second click on the button does; {apply} paints them on a range (whole rows or columns too) on the active sheet; {cancel} puts them down. Reads the selection, part. Changes the document. */
|
|
526
|
+
"edit.formatPainter": {
|
|
527
|
+
apply?: string;
|
|
528
|
+
cancel?: boolean;
|
|
529
|
+
sticky?: boolean;
|
|
530
|
+
};
|
|
531
|
+
/** Edit Cell. Puts the active cell into edit mode in the editor (F2); for agents, use cell.set to change a cell. Params: {}. */
|
|
532
|
+
"edit.beginEdit": Record<string, never>;
|
|
533
|
+
/** Move Cells. Moves (or copies) a block of cells to a new top-left cell, as dragging the selection's border does in WPS and Excel: values, formulas, formats, merged areas, notes, links, conditional formats, validation and tables go with the cells, and formulas that refer to them follow. With insert the cells at the destination make room (down or right) and the place left behind closes up; whole rows and columns move as rows and columns. Answers the range where the block landed (it is selected). Params: {from?: "B2:C4" (default: the selection; whole rows "3:4" or columns "C:D" move as rows or columns), to: "E5" (the block's new top-left cell; a row or a column for whole lines), copy?: bool (a copy, as a drag with Cmd/Ctrl held), insert?: "down"|"right" (the cells at `to` make room, as a drag with Shift held: down moves them down, right moves them right; whole rows and columns always make room as rows or columns)} ? {range}: a drag of the selection's border (WPS, Excel): the cells move with their values, formulas, formats, merged areas, notes, links, conditional formats, validation and tables, and formulas anywhere that refer to them follow. Reads the selection, part. Changes the document. */
|
|
534
|
+
"edit.moveCells": {
|
|
535
|
+
copy?: boolean; /** the block in A1 notation such as B2:C4, whole rows such as 3:4 or columns such as C:D; default: the selection */
|
|
536
|
+
from?: string; /** make room at `to` instead of overwriting (a drag with Shift held): down moves the cells there down, right moves them right */
|
|
537
|
+
insert?: "down" | "right"; /** the cells at `to` make room, as a drag with Shift held: down moves them down, right moves them right; whole rows and columns always make room as rows or columns; one of several alternative parameters */
|
|
538
|
+
right?: number; /** the block's new top-left cell such as E5 (a row's or a column's first cell for whole lines) */
|
|
539
|
+
to?: string;
|
|
540
|
+
};
|
|
541
|
+
/** Bold. Turns bold on or off for a range (default: the selection); without on it toggles from the first cell. Params: {range?, on?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
542
|
+
"home.bold": {
|
|
543
|
+
cell?: string;
|
|
544
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
545
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
546
|
+
sheet?: Json;
|
|
547
|
+
};
|
|
548
|
+
/** Italic. Turns italic on or off for a range (default: the selection); without on it toggles. Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
549
|
+
"home.italic": {
|
|
550
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
551
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
552
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
553
|
+
sheet?: Json;
|
|
554
|
+
};
|
|
555
|
+
/** Underline. Sets or toggles underline on a range, with a single, double or accounting style. Params: {range?, on?, style?: single|double|singleAccounting|doubleAccounting}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
556
|
+
"home.underline": {
|
|
557
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
558
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
559
|
+
sheet?: Json;
|
|
560
|
+
style?: "single" | "double" | "singleAccounting" | "doubleAccounting";
|
|
561
|
+
};
|
|
562
|
+
/** Double Underline. Toggles a double underline on a range (default: the selection). Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
563
|
+
"home.doubleUnderline": {
|
|
564
|
+
range?: string;
|
|
565
|
+
};
|
|
566
|
+
/** Strikethrough. Turns strikethrough on or off for a range (default: the selection). Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
567
|
+
"home.strikethrough": {
|
|
568
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
569
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
570
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
571
|
+
sheet?: Json;
|
|
572
|
+
};
|
|
573
|
+
/** Superscript. Turns superscript on or off for a range's text (default: the selection). Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
574
|
+
"home.superscript": {
|
|
575
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
576
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
577
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
578
|
+
sheet?: Json;
|
|
579
|
+
};
|
|
580
|
+
/** Subscript. Turns subscript on or off for a range's text (default: the selection). Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
581
|
+
"home.subscript": {
|
|
582
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
583
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
584
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
585
|
+
sheet?: Json;
|
|
586
|
+
};
|
|
587
|
+
/** Font. Sets the font family of a range (default: the selection). Params: {range?, name: "Calibri"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
588
|
+
"home.fontName": {
|
|
589
|
+
name?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
590
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
591
|
+
sheet?: Json;
|
|
592
|
+
};
|
|
593
|
+
/** Font Size. Sets the font size in points for a range (default: the selection). Params: {range?, size: 11}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
594
|
+
"home.fontSize": {
|
|
595
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
596
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
597
|
+
sheet?: Json;
|
|
598
|
+
size?: number;
|
|
599
|
+
};
|
|
600
|
+
/** Increase Font Size. Steps a range's font size up to the next size in the size list. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
601
|
+
"home.increaseFontSize": {
|
|
602
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
603
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
604
|
+
sheet?: Json;
|
|
605
|
+
};
|
|
606
|
+
/** Decrease Font Size. Steps a range's font size down to the previous size in the size list. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
607
|
+
"home.decreaseFontSize": {
|
|
608
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
609
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
610
|
+
sheet?: Json;
|
|
611
|
+
};
|
|
612
|
+
/** Font Color. Sets the text colour of a range: a #rrggbb hex, auto, or a theme colour with tint. Params: {range?, color: "#C00000" | "auto" | {theme: 4, tint: -0.25}}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
613
|
+
"home.fontColor": {
|
|
614
|
+
cell?: string;
|
|
615
|
+
color?: Json; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
616
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
617
|
+
sheet?: Json;
|
|
618
|
+
};
|
|
619
|
+
/** Fill Color. Sets the background fill of a range: a #rrggbb hex, none, or a theme colour with tint. Params: {range?, color: "#FFFF00" | "none" | {theme, tint}}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
620
|
+
"home.fillColor": {
|
|
621
|
+
color?: Json; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
622
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
623
|
+
sheet?: Json;
|
|
624
|
+
};
|
|
625
|
+
/** Borders. Applies a border preset (bottom, all, outside, thick box, none...) to a range, optionally with a line style and colour. Params: {range?, preset: bottom|top|left|right|none|all|outside|thickOutside|thickBottom|doubleBottom|topBottom|topThickBottom|topDoubleBottom|insideHorizontal|insideVertical|inside|diagonalDown|diagonalUp, style?: thin|medium|thick|dashed|dotted|double|hair..., color?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
626
|
+
"home.borders": {
|
|
627
|
+
color?: string;
|
|
628
|
+
preset?: "bottom" | "top" | "left" | "right" | "none" | "all" | "outside" | "thickOutside" | "thickBottom" | "doubleBottom" | "topBottom" | "topThickBottom" | "topDoubleBottom" | "insideHorizontal" | "insideVertical" | "inside" | "diagonalDown" | "diagonalUp"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
629
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
630
|
+
sheet?: Json;
|
|
631
|
+
style?: string;
|
|
632
|
+
};
|
|
633
|
+
/** Format Cells. Merges a partial Style object (font, fill, borders, alignment, number format, protection) into every cell of a range, with border presets (edges) and Merge Cells (merge) in the same step: the Format Cells dialog. Colours are hex ("#C00000"), "auto" or {theme, tint}; fill: "#RRGGBB" is a solid fill. Run from a menu without any of them, it opens the dialog. Params: {range?, style?: {font?, fill?, borders?, align?, numFmt?, protection?} (partial Style JSON merged in; colours as "#RRGGBB", fill: "#RRGGBB" for a solid fill), edges?: [{preset: outside|inside|top|bottom|left|right|insideHorizontal|insideVertical|diagonalDown|diagonalUp|none, style?, color?}], merge?: bool} (without any of them a menu opens the Format Cells dialog). Acts on `range`. Reads the selection, part. Changes the document. */
|
|
634
|
+
"home.formatCells": {
|
|
635
|
+
cell?: string; /** border presets as home.borders takes them: [{preset: outside|inside|top|bottom|left|right|insideHorizontal|insideVertical|diagonalDown|diagonalUp|none, style, color}] */
|
|
636
|
+
edges?: Json; /** true merges the range, false unmerges it */
|
|
637
|
+
merge?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
638
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
639
|
+
sheet?: Json; /** a partial Style, such as {font: {bold: true, color: "#1F3864"}, fill: "#DDEBF7", borders: {bottom: {style: Thin, color: "#808080"}}, numFmt: "0.0%"} */
|
|
640
|
+
style?: Json;
|
|
641
|
+
};
|
|
642
|
+
/** Align Left. Aligns the text of a range (default: the selection) to the left of its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
643
|
+
"home.alignLeft": {
|
|
644
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
645
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
646
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
647
|
+
sheet?: Json;
|
|
648
|
+
};
|
|
649
|
+
/** Center. Centres the text of a range horizontally in its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
650
|
+
"home.alignCenter": {
|
|
651
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
652
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
653
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
654
|
+
sheet?: Json;
|
|
655
|
+
};
|
|
656
|
+
/** Align Right. Aligns the text of a range to the right of its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
657
|
+
"home.alignRight": {
|
|
658
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
659
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
660
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
661
|
+
sheet?: Json;
|
|
662
|
+
};
|
|
663
|
+
/** Justify. Justifies the text of a range across the width of its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
664
|
+
"home.justify": {
|
|
665
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
666
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
667
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
668
|
+
sheet?: Json;
|
|
669
|
+
};
|
|
670
|
+
/** Top Align. Aligns the text of a range to the top of its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
671
|
+
"home.alignTop": {
|
|
672
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
673
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
674
|
+
sheet?: Json;
|
|
675
|
+
};
|
|
676
|
+
/** Middle Align. Centres the text of a range vertically in its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
677
|
+
"home.alignMiddle": {
|
|
678
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
679
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
680
|
+
sheet?: Json;
|
|
681
|
+
};
|
|
682
|
+
/** Bottom Align. Aligns the text of a range to the bottom of its cells. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
683
|
+
"home.alignBottom": {
|
|
684
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
685
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
686
|
+
sheet?: Json;
|
|
687
|
+
};
|
|
688
|
+
/** Wrap Text. Turns text wrapping on or off for a range so long text breaks onto several lines inside the cell. Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
689
|
+
"home.wrapText": {
|
|
690
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
691
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
692
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
693
|
+
sheet?: Json;
|
|
694
|
+
};
|
|
695
|
+
/** Shrink to Fit. Turns shrink-to-fit on or off for a range so text shrinks to fit the column width instead of overflowing. Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
696
|
+
"home.shrinkToFit": {
|
|
697
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
698
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
699
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
700
|
+
sheet?: Json;
|
|
701
|
+
};
|
|
702
|
+
/** Increase Indent. Increases the indent level of a range's text by one. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
703
|
+
"home.increaseIndent": {
|
|
704
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
705
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
706
|
+
sheet?: Json;
|
|
707
|
+
};
|
|
708
|
+
/** Decrease Indent. Decreases the indent level of a range's text by one. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
709
|
+
"home.decreaseIndent": {
|
|
710
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
711
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
712
|
+
sheet?: Json;
|
|
713
|
+
};
|
|
714
|
+
/** Orientation. Rotates a range's text by an angle from -90 to 90 degrees, or stacks it vertically. Params: {range?, angle: -90..90 | "vertical" | "counterclockwise" | "clockwise" | "up" | "down" | 0}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
715
|
+
"home.orientation": {
|
|
716
|
+
angle?: Json; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
717
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
718
|
+
sheet?: Json;
|
|
719
|
+
};
|
|
720
|
+
/** Merge & Center. Merges a range into one cell and centres its text; only the top-left value is kept. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
721
|
+
"home.mergeCenter": {
|
|
722
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
723
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
724
|
+
sheet?: Json;
|
|
725
|
+
};
|
|
726
|
+
/** Merge Across. Merges each row of a range into one cell per row; only each row's leftmost value is kept. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
727
|
+
"home.mergeAcross": {
|
|
728
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
729
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
730
|
+
sheet?: Json;
|
|
731
|
+
};
|
|
732
|
+
/** Merge Cells. Merges a range into one cell without changing alignment; only the top-left value is kept. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
733
|
+
"home.mergeCells": {
|
|
734
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
735
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
736
|
+
sheet?: Json;
|
|
737
|
+
};
|
|
738
|
+
/** Unmerge Cells. Splits merged cells in a range back into separate cells; the value stays in the top-left cell. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
739
|
+
"home.unmergeCells": {
|
|
740
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
741
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
742
|
+
sheet?: Json;
|
|
743
|
+
};
|
|
744
|
+
/** Number Format. Sets how numbers in a range display: a named format (Currency, Percentage, Short Date, Text...) or a custom format code such as 0.00%. Params: {range?, format: "General"|"Number"|"Currency"|"Accounting"|"Short Date"|"Long Date"|"Time"|"Percentage"|"Fraction"|"Scientific"|"Text" | code: "0.00"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
745
|
+
"home.numberFormat": {
|
|
746
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
747
|
+
code?: string;
|
|
748
|
+
format?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
749
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
750
|
+
sheet?: Json;
|
|
751
|
+
};
|
|
752
|
+
/** Accounting Number Format. Applies the accounting number format to a range, with a currency symbol ($ by default). Params: {range?, symbol?: "$"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
753
|
+
"home.accounting": {
|
|
754
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
755
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
756
|
+
sheet?: Json; /** like $ */
|
|
757
|
+
symbol?: string;
|
|
758
|
+
};
|
|
759
|
+
/** Percent Style. Formats a range as a percentage without decimals (0.25 shows as 25%); the values stay as they are. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
760
|
+
"home.percent": {
|
|
761
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
762
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
763
|
+
sheet?: Json;
|
|
764
|
+
};
|
|
765
|
+
/** Comma Style. Applies the comma style (thousands separator, two decimals) to a range. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
766
|
+
"home.comma": {
|
|
767
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
768
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
769
|
+
sheet?: Json;
|
|
770
|
+
};
|
|
771
|
+
/** Increase Decimal. Shows one more decimal place in a range's number format. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
772
|
+
"home.increaseDecimal": {
|
|
773
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
774
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
775
|
+
sheet?: Json;
|
|
776
|
+
};
|
|
777
|
+
/** Decrease Decimal. Shows one fewer decimal place in a range's number format. Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
778
|
+
"home.decreaseDecimal": {
|
|
779
|
+
cell?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
780
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
781
|
+
sheet?: Json;
|
|
782
|
+
};
|
|
783
|
+
/** Cell Styles. Applies a named cell style (Good, Bad, Heading 1, Title, Total, Accent1...) to a range. Params: {range?, name: "Good"|"Bad"|"Neutral"|"Heading 1"|"Title"|"Total"|"Accent1"...|"Normal"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
784
|
+
"home.cellStyle": {
|
|
785
|
+
name?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
786
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
787
|
+
sheet?: Json;
|
|
788
|
+
};
|
|
789
|
+
/** Row Height. Sets the height in points of rows given as a row span such as 2:5, one row such as 9, or a list such as 2:3,7 (default: the selection's rows). Params: {rows?: "2:5" | "Data!2:5", height: 20 (points on screen), sheet?: name | index}. Reads the selection, part. Changes the document. */
|
|
790
|
+
"home.rowHeight": {
|
|
791
|
+
height?: number; /** rows: a span such as 2:5, one row such as 9, or a list such as 2:3,7; default: the selection's rows */
|
|
792
|
+
rows?: string; /** name | index */
|
|
793
|
+
sheet?: Json;
|
|
794
|
+
};
|
|
795
|
+
/** Column Width. Sets the width of columns given as a column span such as B:D, one column such as C, or a list such as A,C:D (default: the selection's columns), in points or in characters. Params: {cols?: "B:D" | "Data!B:D", width: 64 (points) | chars: 8.43, sheet?: name | index}. Reads the selection, part. Changes the document. */
|
|
796
|
+
"home.columnWidth": {
|
|
797
|
+
chars?: number; /** columns: a span such as B:D, one column such as C, or a list such as A,C:D; default: the selection's columns */
|
|
798
|
+
cols?: string; /** name | index */
|
|
799
|
+
sheet?: Json; /** points */
|
|
800
|
+
width?: number;
|
|
801
|
+
};
|
|
802
|
+
/** AutoFit Row Height. Fits the height of rows to their content (default: the selection's rows). Params: {rows?}. Reads the selection, part. Changes the document. */
|
|
803
|
+
"home.autofitRowHeight": {
|
|
804
|
+
rows?: Json;
|
|
805
|
+
};
|
|
806
|
+
/** AutoFit Column Width. Fits the width of columns to their widest content (default: the selection's columns). Params: {cols?}. Reads the selection, part. Changes the document. */
|
|
807
|
+
"home.autofitColumnWidth": {
|
|
808
|
+
cols?: string;
|
|
809
|
+
};
|
|
810
|
+
/** Default Width. Sets the default column width of the sheet for columns without their own width. Params: {width: 64}. Reads the part. Changes the document. */
|
|
811
|
+
"home.defaultWidth": {
|
|
812
|
+
sheet?: Json;
|
|
813
|
+
width?: number;
|
|
814
|
+
};
|
|
815
|
+
/** Hide Rows. Hides rows given as a span such as 3:5 (default: the selection's rows); their data is kept. Params: {rows?}. Reads the selection, part. Changes the document. */
|
|
816
|
+
"home.hideRows": {
|
|
817
|
+
rows?: Json;
|
|
818
|
+
};
|
|
819
|
+
/** Hide Columns. Hides columns given as a span such as B:C (default: the selection's columns); their data is kept. Params: {cols?}. Reads the selection, part. Changes the document. */
|
|
820
|
+
"home.hideColumns": {
|
|
821
|
+
cols?: string;
|
|
822
|
+
};
|
|
823
|
+
/** Unhide Rows. Shows hidden rows within a span (default: the selection's rows). Params: {rows?}. Reads the selection, part. Changes the document. */
|
|
824
|
+
"home.unhideRows": {
|
|
825
|
+
rows?: Json;
|
|
826
|
+
};
|
|
827
|
+
/** Unhide Columns. Shows hidden columns within a span (default: the selection's columns). Params: {cols?}. Reads the selection, part. Changes the document. */
|
|
828
|
+
"home.unhideColumns": {
|
|
829
|
+
cols?: string;
|
|
830
|
+
};
|
|
831
|
+
/** Lock Cell. Locks or unlocks cells for sheet protection; locking takes effect only once the sheet is protected. Params: {range?, on?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
832
|
+
"home.lockCell": {
|
|
833
|
+
cell?: string; /** true turns it on, false off; left out, it toggles */
|
|
834
|
+
on?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
835
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
836
|
+
sheet?: Json;
|
|
837
|
+
};
|
|
838
|
+
/** Insert Sheet Rows. Inserts whole rows above the given rows, or count rows above (below: true, under) each area of the selection, shifting the rows after them down and adjusting formulas. The new rows take the formats of the row before them (above) or after them (below), and are selected. Params: {rows?: "3:5", count?, below?: bool}. Reads the selection, part. Changes the document. */
|
|
839
|
+
"home.insertRows": {
|
|
840
|
+
below?: boolean;
|
|
841
|
+
count?: number; /** like 3:5 */
|
|
842
|
+
rows?: string; /** read by the command beside its listed parameters */
|
|
843
|
+
sheet?: Json;
|
|
844
|
+
};
|
|
845
|
+
/** Insert Sheet Columns. Inserts whole columns left of the given columns, or count columns left of (right: true, right of) each area of the selection, shifting the columns after them right and adjusting formulas. The new columns take the formats of the column before them (left) or after them (right), and are selected. Params: {cols?: "B:C", count?, right?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
846
|
+
"home.insertColumns": {
|
|
847
|
+
cell?: string; /** like B:C */
|
|
848
|
+
cols?: string;
|
|
849
|
+
count?: number; /** read by the command beside its listed parameters */
|
|
850
|
+
range?: string;
|
|
851
|
+
right?: boolean; /** read by the command beside its listed parameters */
|
|
852
|
+
sheet?: Json;
|
|
853
|
+
};
|
|
854
|
+
/** Delete Sheet Rows. Deletes whole rows (default: the selection's rows), shifting the rows below up; formulas that pointed into them become #REF!. Params: {rows?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
855
|
+
"home.deleteRows": {
|
|
856
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
857
|
+
count?: number; /** read by the command beside its listed parameters */
|
|
858
|
+
range?: string;
|
|
859
|
+
rows?: number; /** read by the command beside its listed parameters */
|
|
860
|
+
sheet?: Json;
|
|
861
|
+
};
|
|
862
|
+
/** Delete Sheet Columns. Deletes whole columns (default: the selection's columns), shifting the others left; formulas that pointed into them become #REF!. Params: {cols?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
863
|
+
"home.deleteColumns": {
|
|
864
|
+
cell?: string; /** a column span such as B:D; default: the selection's columns */
|
|
865
|
+
cols?: string; /** read by the command beside its listed parameters */
|
|
866
|
+
count?: number; /** read by the command beside its listed parameters */
|
|
867
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
868
|
+
sheet?: Json;
|
|
869
|
+
};
|
|
870
|
+
/** Insert Cells. Inserts blank cells at a range, shifting existing cells right or down, or inserting entire rows or columns. Params: {range?, shift: right|down|row|column}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
871
|
+
"home.insertCells": {
|
|
872
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
873
|
+
sheet?: Json;
|
|
874
|
+
shift?: "right" | "down" | "row" | "column";
|
|
875
|
+
};
|
|
876
|
+
/** Delete Cells. Deletes the cells of a range, shifting the cells beside them left or up, or deleting entire rows or columns. Params: {range?, shift: left|up|row|column}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
877
|
+
"home.deleteCells": {
|
|
878
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
879
|
+
sheet?: Json;
|
|
880
|
+
shift?: "left" | "up" | "row" | "column";
|
|
881
|
+
};
|
|
882
|
+
/** Insert Sheet. Adds a new worksheet, optionally named and placed before the sheet at a 0-based index. Params: {name?, before?: index}. Reads the selection, part. Changes the document. */
|
|
883
|
+
"home.insertSheet": {
|
|
884
|
+
before?: number;
|
|
885
|
+
name?: string;
|
|
886
|
+
};
|
|
887
|
+
/** Delete Sheet. Deletes a sheet (default: the active one) with all its data; the last remaining sheet cannot be deleted. Params: {sheet?}. Reads the part. Changes the document. */
|
|
888
|
+
"home.deleteSheet": {
|
|
889
|
+
sheet?: Json;
|
|
890
|
+
};
|
|
891
|
+
/** Rename Sheet. Renames a sheet (default: the active one); formulas that refer to it follow the new name. Params: {sheet?, name}. Reads the part. Changes the document. */
|
|
892
|
+
"sheet.rename": {
|
|
893
|
+
name?: string;
|
|
894
|
+
sheet?: Json;
|
|
895
|
+
};
|
|
896
|
+
/** Move or Copy Sheet. Moves a sheet to a new 0-based position, or copies it there when copy is true (the copy is named as WPS names one, Sheet1(2), and answers its name). Params: {sheet?, to: index, copy?: bool} ? index (and a copy's name). Acts on `range`. Reads the selection, part. Changes the document. */
|
|
897
|
+
"sheet.move": {
|
|
898
|
+
cell?: string;
|
|
899
|
+
copy?: boolean; /** read by the command beside its listed parameters */
|
|
900
|
+
range?: string;
|
|
901
|
+
sheet?: Json; /** a position counted from 0 (the first is 0) */
|
|
902
|
+
to?: number;
|
|
903
|
+
};
|
|
904
|
+
/** Tab Color. Sets or clears the colour of a sheet's tab. Params: {sheet?, color: "#FF0000"|"none"}. Reads the part. Changes the document. */
|
|
905
|
+
"sheet.tabColor": {
|
|
906
|
+
color?: "#FF0000" | "none";
|
|
907
|
+
sheet?: Json;
|
|
908
|
+
};
|
|
909
|
+
/** Hide Sheet. Hides a sheet (default: the active one); at least one sheet stays visible. Params: {sheet?}. Reads the selection, part. Changes the document. */
|
|
910
|
+
"sheet.hide": {
|
|
911
|
+
sheet?: Json;
|
|
912
|
+
};
|
|
913
|
+
/** Unhide Sheet. Shows a hidden sheet by name or index, and shows it in view unless activate is false. Params: {sheet, activate?: bool (default true)}. Reads the selection, part. Changes the document. */
|
|
914
|
+
"sheet.unhide": {
|
|
915
|
+
activate?: boolean;
|
|
916
|
+
sheet?: Json;
|
|
917
|
+
};
|
|
918
|
+
/** Activate Sheet. Makes the sheet with the given 0-based index or name the active sheet; answers its name and index. Params: {sheet: index | name}. Reads the part. */
|
|
919
|
+
"sheet.activate": {
|
|
920
|
+
sheet?: Json;
|
|
921
|
+
};
|
|
922
|
+
/** Next Sheet. Activates the next sheet tab. Params: {}. Reads the part. */
|
|
923
|
+
"sheet.next": Record<string, never>;
|
|
924
|
+
/** Previous Sheet. Activates the previous sheet tab. Params: {}. Reads the part. */
|
|
925
|
+
"sheet.previous": Record<string, never>;
|
|
926
|
+
/** Table. Turns a range (default: the current region) into a structured table with a style, a header row and a name. Params: {range?, header?: true, style?: "TableStyleMedium2", name?, filter?: true, columnPrefix?: "Column", clearPictures?: bool (pictures in the header row go; without it they refuse the table)}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
927
|
+
"insert.table": {
|
|
928
|
+
clearPictures?: boolean; /** the generic name for empty headers, numbered (Column1, ?1) */
|
|
929
|
+
columnPrefix?: string; /** with mode table: whether the header shows filter buttons (default true) */
|
|
930
|
+
filter?: boolean;
|
|
931
|
+
header?: boolean;
|
|
932
|
+
name?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
933
|
+
range?: string; /** like TableStyleMedium2 */
|
|
934
|
+
style?: string;
|
|
935
|
+
};
|
|
936
|
+
/** Format as Table. Formats a range (default: the selection, or the data around the active cell) with a table style: as a table (mode table, the default), or only its look written into the cells (mode format, WPS's Only Format As Table, with titleRows header rows). Params: {range?, style?: "TableStyleMedium2" (default: the workbook's default table style), mode?: table|format (format: only the look, written into the cells, as WPS's Only Format As Table), titleRows?: 1 (format), header?, filter?: true, columnPrefix?: "Column" (names for empty headers), clearPictures?: bool (pictures in the header row go; without it they refuse the table)}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
937
|
+
"home.formatAsTable": {
|
|
938
|
+
clearPictures?: boolean; /** the generic name for empty headers, numbered (Column1, ?1) */
|
|
939
|
+
columnPrefix?: string; /** with mode table: whether the header shows filter buttons (default true) */
|
|
940
|
+
filter?: boolean;
|
|
941
|
+
header?: boolean; /** table (a table with a header row, filter buttons and bands) or format (only the look, written into the cells) */
|
|
942
|
+
mode?: "table" | "format"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
943
|
+
range?: string; /** a table style name: TableStyleLight1...21, TableStyleMedium1...28, TableStyleDark1...11, or one the workbook defines; default: the workbook's default table style */
|
|
944
|
+
style?: string; /** with mode format: how many rows on top take the header's format (0 for none) */
|
|
945
|
+
titleRows?: number;
|
|
946
|
+
};
|
|
947
|
+
/** Table Styles Gallery. Answers the table style gallery: the theme colours (Text 1, Accent 1?6), the built-in styles in light, medium and dark groups for one of them with a 5?5 preview each, the workbook's own styles, the default style, the active table's style, and the range Format as Table would take. Params: {slot?: 0..6 (the gallery's theme colour: Text 1, Accent 1?6)} ? {slot, colors, groups: [{id: light|medium|dark, styles: [{name, preview}]}], custom: [{name, preview, elements}], default, current, table, range}. Reads the selection, part. */
|
|
948
|
+
"table.styles": {
|
|
949
|
+
slot?: number;
|
|
950
|
+
};
|
|
951
|
+
/** New Table Style. Defines a table style of the workbook's own (New Table Style), saved with the file: each part (whole table, header row, total row, first or last column, row or column stripes) with its fill, text colour, bold, italic, border and inside lines; or modifies one (replace). Params: {name, elements: {wholeTable?|headerRow?|totalRow?|firstColumn?|lastColumn?|firstRowStripe?|secondRowStripe?|firstColumnStripe?|secondColumnStripe?: {fill?: "#RRGGBB", color?: "#RRGGBB", bold?, italic?, border?: "#RRGGBB" (around it), lines?: "#RRGGBB" (inside it), size?: 1 (stripes)}}, replace?: "name" (modifies that style), default?: bool}. Changes the document. */
|
|
952
|
+
"table.newStyle": {
|
|
953
|
+
default?: boolean; /** by part (wholeTable, headerRow, totalRow, firstColumn, lastColumn, firstRowStripe, secondRowStripe, firstColumnStripe, secondColumnStripe): {fill, color, bold, italic, border, lines, size}, colours as "#RRGGBB" */
|
|
954
|
+
elements?: Json; /** the style's name */
|
|
955
|
+
name?: string; /** the name of the workbook's style to modify */
|
|
956
|
+
replace?: string;
|
|
957
|
+
};
|
|
958
|
+
/** Delete Table Style. Deletes a table style the workbook defines; tables that used it take the default style. Params: {name} (a style the workbook defines; its tables take the default style). Changes the document. */
|
|
959
|
+
"table.deleteStyle": {
|
|
960
|
+
name?: string;
|
|
961
|
+
};
|
|
962
|
+
/** Set As Default Table Style. Makes a table style the workbook's default, the one Format as Table and new tables take ("" goes back to Kition Sheet's). Params: {name} ("": Kition Sheet's default). Changes the document. */
|
|
963
|
+
"table.setDefaultStyle": {
|
|
964
|
+
name?: string;
|
|
965
|
+
};
|
|
966
|
+
/** Total Row. Shows or hides the total row of a table (default: the table at the active cell). Params: {table?, on?: bool}. Reads the selection, part. Changes the document. */
|
|
967
|
+
"table.totalRow": {
|
|
968
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
969
|
+
table?: string;
|
|
970
|
+
};
|
|
971
|
+
/** Banded Rows. Turns banded (striped) rows on or off for a table. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
972
|
+
"table.bandedRows": {
|
|
973
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
974
|
+
table?: string;
|
|
975
|
+
};
|
|
976
|
+
/** Banded Columns. Turns banded columns on or off for a table. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
977
|
+
"table.bandedColumns": {
|
|
978
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
979
|
+
table?: string;
|
|
980
|
+
};
|
|
981
|
+
/** Header Row. Shows or hides the header row of a table: hidden, the header's cells leave the table; shown again, the row above the data takes the column names. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
982
|
+
"table.headerRow": {
|
|
983
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
984
|
+
table?: string;
|
|
985
|
+
};
|
|
986
|
+
/** Filter Button. Shows or hides the filter buttons in a table's header row. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
987
|
+
"table.filterButton": {
|
|
988
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
989
|
+
table?: string;
|
|
990
|
+
};
|
|
991
|
+
/** First Column. Turns special formatting of a table's first column on or off. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
992
|
+
"table.firstColumn": {
|
|
993
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
994
|
+
table?: string;
|
|
995
|
+
};
|
|
996
|
+
/** Last Column. Turns special formatting of a table's last column on or off. Params: {table?, on?}. Reads the selection, part. Changes the document. */
|
|
997
|
+
"table.lastColumn": {
|
|
998
|
+
on?: boolean; /** a table name; default: the table at the active cell */
|
|
999
|
+
table?: string;
|
|
1000
|
+
};
|
|
1001
|
+
/** Table Styles. Applies a table style to a table: a built-in one (TableStyleLight1...21, TableStyleMedium1...28, TableStyleDark1...11), one the workbook defines, or None for no style. Params: {table?, style: "TableStyleMedium2" | a style the workbook defines | "None" (no style)}. Reads the selection, part. Changes the document. */
|
|
1002
|
+
"table.style": {
|
|
1003
|
+
style?: Json; /** a table name; default: the table at the active cell */
|
|
1004
|
+
table?: string;
|
|
1005
|
+
};
|
|
1006
|
+
/** Table Name. Renames a table; structured references to it follow the new name. Params: {table?, name}. Reads the selection, part. Changes the document. */
|
|
1007
|
+
"table.rename": {
|
|
1008
|
+
name?: string; /** a table name; default: the table at the active cell */
|
|
1009
|
+
table?: string;
|
|
1010
|
+
};
|
|
1011
|
+
/** Convert to Range. Converts a table back to a normal range, keeping its values and formatting. Params: {table?}. Reads the selection, part. Changes the document. */
|
|
1012
|
+
"table.convertToRange": {
|
|
1013
|
+
table?: string;
|
|
1014
|
+
};
|
|
1015
|
+
/** Totals Function. Sets the function shown in a table column's total row (sum, average, count, max, min...) or removes it with none. Params: {table?, column: "Sales", function: sum|average|count|countNums|max|min|stdDev|var|none}. Reads the selection, part. Changes the document. */
|
|
1016
|
+
"table.totalFunction": {
|
|
1017
|
+
column?: string;
|
|
1018
|
+
function?: string; /** a table name; default: the table at the active cell */
|
|
1019
|
+
table?: string;
|
|
1020
|
+
};
|
|
1021
|
+
/** Insert Chart. Inserts a chart of a range (default: the current region; several areas side by side, such as A1:A5,C1:D5, chart together) with a type, title and position, and answers the new chart's id for chart.* commands. As in Excel, the first row names the series and the first column holds the categories when it is text, when the corner cell is blank, or when it holds dates; a scatter chart takes the first column as X. A combo chart is clustered columns and lines (the first series columns, the others lines) unless seriesTypes says otherwise; a waterfall marks as totals only the points listed in totals. Params: {range?, type?: column|bar|line|pie|doughnut|area|scatter|bubble|radar|combo|histogram|waterfall|funnel|treemap|sunburst|boxWhisker|stock, subtype?: clustered|stacked|stacked100|markers, title?, at?: "H2", width?, height?, seriesTypes?: [column|line|area...], secondary?: [series index], totals?: [point index]}. Reads the selection, part. Changes the document. */
|
|
1022
|
+
"insert.chart": {
|
|
1023
|
+
at?: string;
|
|
1024
|
+
height?: number; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1025
|
+
range?: string; /** type: combo: the series (by index from 0) drawn against a second value axis */
|
|
1026
|
+
secondary?: Array<number>; /** type: combo: each series' type in order (column, stackedColumn, bar, line, lineMarkers, area, scatter); series not listed: the first column, the others line */
|
|
1027
|
+
seriesTypes?: Array<string>;
|
|
1028
|
+
subtype?: "clustered" | "stacked" | "stacked100" | "markers";
|
|
1029
|
+
title?: string; /** type: waterfall: the points (by index from 0) set as totals, drawn from the axis with their own value, such as [0, 8] for an opening and a closing balance */
|
|
1030
|
+
totals?: Array<number>;
|
|
1031
|
+
type?: "column" | "bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | "bubble" | "radar" | "combo" | "histogram" | "waterfall" | "funnel" | "treemap" | "sunburst" | "boxWhisker" | "stock";
|
|
1032
|
+
width?: number;
|
|
1033
|
+
};
|
|
1034
|
+
/** Recommended Charts. Inserts the chart type that best fits a range's data shape, as Recommended Charts suggests. Params: {range?}. Reads the selection, part. Changes the document. */
|
|
1035
|
+
"insert.recommendedCharts": {
|
|
1036
|
+
range?: string;
|
|
1037
|
+
};
|
|
1038
|
+
/** Chart Properties. Changes a chart's properties in one call: type, title, legend, data labels, gridlines, style, axis titles, position and size, and a waterfall's totals. Params: {chart?: id, type?, title?, legend?: none|bottom|top|left|right, dataLabels?, gridlines?, style?, xTitle?, yTitle?, at?, width?, height?, dx?, dy?, totals?: [point index]}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1039
|
+
"chart.set": {
|
|
1040
|
+
at?: string; /** an id */
|
|
1041
|
+
chart?: Json;
|
|
1042
|
+
dataLabels?: Json;
|
|
1043
|
+
dx?: number;
|
|
1044
|
+
dy?: number;
|
|
1045
|
+
gridlines?: Json;
|
|
1046
|
+
height?: number;
|
|
1047
|
+
legend?: "none" | "bottom" | "top" | "left" | "right"; /** a chart style number, clamped to 1 through 16 */
|
|
1048
|
+
style?: number;
|
|
1049
|
+
title?: string; /** a waterfall's points (by index from 0) set as totals; [] sets none */
|
|
1050
|
+
totals?: Array<number>; /** a chart type such as column, bar, line, pie */
|
|
1051
|
+
type?: string;
|
|
1052
|
+
width?: number;
|
|
1053
|
+
xTitle?: string;
|
|
1054
|
+
yTitle?: string;
|
|
1055
|
+
};
|
|
1056
|
+
/** Switch Row/Column. Swaps which of a chart's data runs as series and which as categories. Params: {chart?}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1057
|
+
"chart.switchRowColumn": {
|
|
1058
|
+
chart?: Json;
|
|
1059
|
+
};
|
|
1060
|
+
/** Delete Chart. Deletes a chart (default: the selected one). Params: {chart?}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1061
|
+
"chart.delete": {
|
|
1062
|
+
chart?: Json;
|
|
1063
|
+
};
|
|
1064
|
+
/** Sparklines. Adds sparklines (tiny line, column or win/loss charts) for a data range into location cells. Params: {range: "B2:M2", location: "N2", type?: line|column|winLoss, markers?}. Acts on `range`. Reads the part. Changes the document. */
|
|
1065
|
+
"insert.sparkline": {
|
|
1066
|
+
location?: string;
|
|
1067
|
+
markers?: boolean; /** like B2:M2 */
|
|
1068
|
+
range?: string;
|
|
1069
|
+
type?: "line" | "column" | "winLoss";
|
|
1070
|
+
};
|
|
1071
|
+
/** Picture. Inserts a picture from a file path or base64 bytes at a cell, with size, alternative text and how it moves with cells. Params: {path? | base64?: "...", mime?, at?: "B2", width?, height?, alt?, mode?: moveOnly|moveAndSize|absolute, placement?: cell|overCells}. Reads the selection, part. Changes the document. */
|
|
1072
|
+
"insert.picture": {
|
|
1073
|
+
alt?: string; /** read by the command beside its listed parameters */
|
|
1074
|
+
anchorMode?: string; /** like B2 */
|
|
1075
|
+
at?: string; /** like ...; one of several alternative parameters */
|
|
1076
|
+
base64?: string;
|
|
1077
|
+
height?: number;
|
|
1078
|
+
mime?: string;
|
|
1079
|
+
mode?: "moveOnly" | "moveAndSize" | "absolute"; /** like ...; one of several alternative parameters */
|
|
1080
|
+
path?: Json;
|
|
1081
|
+
placement?: "cell" | "overCells";
|
|
1082
|
+
width?: number;
|
|
1083
|
+
};
|
|
1084
|
+
/** Shapes. Inserts a shape (rectangle, rounded rectangle, ellipse, triangle, line, arrow or text box) at a cell, with size, text, fill and line. Params: {kind: rectangle|roundedRectangle|ellipse|triangle|line|arrow|textBox, at?, width?, height?, text?, fill?, line?}. Reads the selection, part. Changes the document. */
|
|
1085
|
+
"insert.shape": {
|
|
1086
|
+
at?: string;
|
|
1087
|
+
fill?: Json;
|
|
1088
|
+
height?: number;
|
|
1089
|
+
kind?: "rectangle" | "roundedRectangle" | "ellipse" | "triangle" | "line" | "arrow" | "textBox";
|
|
1090
|
+
line?: Json;
|
|
1091
|
+
text?: string;
|
|
1092
|
+
width?: number;
|
|
1093
|
+
};
|
|
1094
|
+
/** Icons. Inserts a built-in icon (chart, table, sum, filter, lock, check...) at a cell, with size and colour. Params: {name: chart|table|sum|filter|lock|comment|picture|book|folder|search|calc|check|... , at?, size?: 48, color?: hex}. Reads the selection, part. Changes the document. */
|
|
1095
|
+
"insert.icons": {
|
|
1096
|
+
at?: string; /** a colour such as #rrggbb */
|
|
1097
|
+
color?: string;
|
|
1098
|
+
name?: string;
|
|
1099
|
+
size?: number;
|
|
1100
|
+
};
|
|
1101
|
+
/** Text Box. Inserts a text box at a cell with a size and text. Params: {at?, width?, height?, text?}. Reads the selection, part. Changes the document. */
|
|
1102
|
+
"insert.textBox": {
|
|
1103
|
+
at?: string;
|
|
1104
|
+
height?: number;
|
|
1105
|
+
text?: string;
|
|
1106
|
+
width?: number;
|
|
1107
|
+
};
|
|
1108
|
+
/** Art text. Inserts decorative art text, optionally warped by a preset such as textArchUp. Params: {text?, warp?: preset (textArchUp, textWave1, textInflate...)}. Reads the selection, part. Changes the document. */
|
|
1109
|
+
"insert.artText": {
|
|
1110
|
+
text?: string; /** a warp preset such as textArchUp */
|
|
1111
|
+
warp?: string; /** read by the command beside its listed parameters */
|
|
1112
|
+
width?: number;
|
|
1113
|
+
};
|
|
1114
|
+
/** Edit Text Box. Replaces the text of a text box or shape by its id. Params: {id: textBox id, text: string}. Acts on `id`. Reads the part. Changes the document. */
|
|
1115
|
+
"shape.setText": {
|
|
1116
|
+
id?: Json;
|
|
1117
|
+
text?: string;
|
|
1118
|
+
};
|
|
1119
|
+
/** Delete Object. Deletes a chart, image or shape by kind and id. Params: {kind: chart|image|shape, id}. Acts on `id`. Reads the part. Changes the document. */
|
|
1120
|
+
"object.delete": {
|
|
1121
|
+
id?: Json;
|
|
1122
|
+
kind?: "chart" | "image" | "shape";
|
|
1123
|
+
};
|
|
1124
|
+
/** Move Object. Moves or resizes a chart, image or shape: to a cell, by an offset, or to a width and height. Params: {kind: chart|image|shape, id, at?: "C3", dx?, dy?, width?, height?}. Acts on `id`. Reads the part. Changes the document. */
|
|
1125
|
+
"object.move": {
|
|
1126
|
+
at?: string;
|
|
1127
|
+
dx?: number;
|
|
1128
|
+
dy?: number;
|
|
1129
|
+
height?: number; /** an id */
|
|
1130
|
+
id?: Json;
|
|
1131
|
+
kind?: "chart" | "image" | "shape";
|
|
1132
|
+
width?: number;
|
|
1133
|
+
};
|
|
1134
|
+
/** Object Properties. Sets how a chart, image or shape follows its cells: move and size with them, move only, or stay fixed. Params: {kind: chart|image|shape, id, mode: moveAndSize|moveOnly|absolute}. Acts on `id`. Reads the part. Changes the document. */
|
|
1135
|
+
"object.setAnchorMode": {
|
|
1136
|
+
id?: Json;
|
|
1137
|
+
kind?: "chart" | "image" | "shape";
|
|
1138
|
+
mode?: "moveAndSize" | "moveOnly" | "absolute";
|
|
1139
|
+
};
|
|
1140
|
+
/** Link. Adds a hyperlink to a cell (to a web address, a place in the workbook, or an email address) or removes it. Params: {cell?, target: "https://..." | "Sheet2!A1" | "mailto:...", text?, tooltip?, remove?: bool}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1141
|
+
"insert.link": {
|
|
1142
|
+
cell?: string;
|
|
1143
|
+
remove?: boolean;
|
|
1144
|
+
target?: "https://…" | "Sheet2!A1" | "mailto:…";
|
|
1145
|
+
text?: string;
|
|
1146
|
+
tooltip?: string;
|
|
1147
|
+
};
|
|
1148
|
+
/** New Note. Adds a note (a plain, unthreaded annotation) to a cell. Params: {cell?, text, author?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1149
|
+
"review.newNote": {
|
|
1150
|
+
author?: string; /** one cell in A1 notation such as B2; default: the active cell */
|
|
1151
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
1152
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1153
|
+
sheet?: Json;
|
|
1154
|
+
text?: string;
|
|
1155
|
+
};
|
|
1156
|
+
/** New Comment. Starts a threaded comment on a cell; use review.replyComment to answer an existing thread. Params: {cell?, text, author?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1157
|
+
"review.newComment": {
|
|
1158
|
+
author?: string; /** one cell in A1 notation such as B2; default: the active cell */
|
|
1159
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
1160
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1161
|
+
sheet?: Json;
|
|
1162
|
+
text?: string;
|
|
1163
|
+
};
|
|
1164
|
+
/** Reply. Adds a reply to the comment thread on a cell. Params: {cell?, text, author?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1165
|
+
"review.replyComment": {
|
|
1166
|
+
author?: string; /** one cell in A1 notation such as B2; default: the active cell */
|
|
1167
|
+
cell?: string;
|
|
1168
|
+
text?: string;
|
|
1169
|
+
};
|
|
1170
|
+
/** Resolve Thread. Marks the comment thread on a cell as resolved, or reopens it. Params: {cell?, resolved?: true}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1171
|
+
"review.resolveComment": {
|
|
1172
|
+
cell?: string;
|
|
1173
|
+
resolved?: boolean;
|
|
1174
|
+
};
|
|
1175
|
+
/** Delete Comment. Deletes the comment thread or note on a cell. Params: {cell?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1176
|
+
"review.deleteComment": {
|
|
1177
|
+
cell?: string;
|
|
1178
|
+
};
|
|
1179
|
+
/** Show/Hide Note. Shows or hides a cell's note on the sheet. Params: {cell?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1180
|
+
"review.showNote": {
|
|
1181
|
+
cell?: string;
|
|
1182
|
+
};
|
|
1183
|
+
/** Symbol. Appends a character such as ? to the end of the active cell's text (in the editor: at the caret of what is being typed, else after the cell's text with the cell left open, as WPS does). Params: {char: "?"} (inserted at the end of the active cell's text). Reads the selection, part. Changes the document. */
|
|
1184
|
+
"insert.symbol": {
|
|
1185
|
+
char?: string;
|
|
1186
|
+
};
|
|
1187
|
+
/** Conditional Formatting. Adds a conditional formatting rule to a range (cell value with an operator, formula, text, duplicates, top/bottom, dates, data bar, colour scale, icon set) with its format; Excel's names and defaults (icon sets cut at percent of the min?max span). Params: {range?, rule: {type: cellIs|expression|containsText|notContainsText|beginsWith|endsWith|blanks|noBlanks|errors|noErrors|duplicate|unique|top10|aboveAverage|timePeriod|colorScale|dataBar|iconSet, operator?: greaterThan|lessThan|greaterThanOrEqual|lessThanOrEqual|equal|notEqual|between|notBetween, value?, value2?, formula?, text?, rank?, bottom?, percent?, below?, period?, colors?: [low, mid?, high], color?, min?, max?, gradient?, set?: 3Arrows|3TrafficLights1|3Flags|3Symbols|3Stars|4Rating|5Quarters..., thresholds?: [boundaries between icons, ascending: numbers (percent of the min?max span) or {type: number|percent|percentile|formula, value}], reverse?, showValue?, style?: {fill: "#RRGGBB", font: {color: "#RRGGBB", bold, italic, strike}, borders}|preset: lightRedFill|redText|yellowFill|greenFill|redBorder|lightRedFillDarkRedText...}} (a rule refuses keys it does not read; newer rules take precedence). Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1188
|
+
"home.conditionalFormat": {
|
|
1189
|
+
range?: string; /** the rule; it refuses keys its type does not read. Newer rules take precedence (their fill wins over an older colour scale's, and the other way round). */
|
|
1190
|
+
rule?: {
|
|
1191
|
+
below?: boolean;
|
|
1192
|
+
bottom?: boolean;
|
|
1193
|
+
color?: string;
|
|
1194
|
+
colors?: Array<string>;
|
|
1195
|
+
formula?: string;
|
|
1196
|
+
gradient?: boolean;
|
|
1197
|
+
max?: Json;
|
|
1198
|
+
min?: Json;
|
|
1199
|
+
operator?: "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual" | "equal" | "notEqual" | "between" | "notBetween";
|
|
1200
|
+
percent?: boolean;
|
|
1201
|
+
period?: "yesterday" | "today" | "tomorrow" | "last7Days" | "lastWeek" | "thisWeek" | "nextWeek" | "lastMonth" | "thisMonth" | "nextMonth";
|
|
1202
|
+
preset?: "lightRedFillDarkRedText" | "lightRedFill" | "redText" | "yellowFill" | "yellowFillDarkYellowText" | "greenFill" | "greenFillDarkGreenText" | "redBorder";
|
|
1203
|
+
rank?: number;
|
|
1204
|
+
reverse?: boolean;
|
|
1205
|
+
set?: "3Arrows" | "3ArrowsGray" | "3Flags" | "3TrafficLights1" | "3TrafficLights2" | "3Signs" | "3Symbols" | "3Symbols2" | "3Stars" | "3Triangles" | "4Arrows" | "4ArrowsGray" | "4RedToBlack" | "4Rating" | "4TrafficLights" | "5Arrows" | "5ArrowsGray" | "5Rating" | "5Quarters" | "5Boxes";
|
|
1206
|
+
showValue?: boolean;
|
|
1207
|
+
style?: Json;
|
|
1208
|
+
text?: string;
|
|
1209
|
+
thresholds?: Array<Json>;
|
|
1210
|
+
type?: "cellIs" | "expression" | "containsText" | "notContainsText" | "beginsWith" | "endsWith" | "blanks" | "noBlanks" | "errors" | "noErrors" | "duplicate" | "unique" | "top10" | "aboveAverage" | "timePeriod" | "colorScale" | "dataBar" | "iconSet";
|
|
1211
|
+
value?: Json;
|
|
1212
|
+
value2?: Json;
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1215
|
+
/** Clear Rules. Removes conditional formatting rules from a range, or from the whole sheet. Params: {range?|sheet: true}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1216
|
+
"home.clearRules": {
|
|
1217
|
+
range?: string; /** clear every conditional formatting rule on the active sheet */
|
|
1218
|
+
sheet?: boolean;
|
|
1219
|
+
};
|
|
1220
|
+
/** Manage Rules. Deletes a conditional formatting rule or moves it up or down in priority, by its index in the sheet's rule list. Params: {delete?: index, moveUp?: index, moveDown?: index}. Reads the part. Changes the document. */
|
|
1221
|
+
"home.manageRules": {
|
|
1222
|
+
cell?: string; /** a position counted from 0 (the first is 0) */
|
|
1223
|
+
delete?: number; /** a position counted from 0 (the first is 0) */
|
|
1224
|
+
moveDown?: number; /** a position counted from 0 (the first is 0) */
|
|
1225
|
+
moveUp?: number; /** read by the command beside its listed parameters */
|
|
1226
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1227
|
+
sheet?: Json;
|
|
1228
|
+
};
|
|
1229
|
+
/** Sort A to Z. Sorts the current region (or range) ascending by one column (default: the active cell's column), keeping rows together. Params: {range?, column?: "B"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1230
|
+
"data.sortAscending": {
|
|
1231
|
+
cell?: string; /** like B */
|
|
1232
|
+
column?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1233
|
+
range?: string;
|
|
1234
|
+
};
|
|
1235
|
+
/** Sort Z to A. Sorts the current region (or range) descending by one column, keeping rows together. Params: {range?, column?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1236
|
+
"data.sortDescending": {
|
|
1237
|
+
cell?: string;
|
|
1238
|
+
column?: number; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1239
|
+
range?: string;
|
|
1240
|
+
};
|
|
1241
|
+
/** Sort. Sorts a range by several keys, each a column with an order, by values or by cell or font colour, optionally by rows instead of columns. Params: {range?, header?: bool, keys: [{column: "B", order: asc|desc, by?: values|cellColor|fontColor, customList?: [..]}], orientation?: rows|columns, matchCase?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1242
|
+
"data.sort": {
|
|
1243
|
+
header?: boolean; /** [{column: "B", order: asc|desc, by?: values|cellColor|fontColor, customList?: [..]}] */
|
|
1244
|
+
keys?: Array<{
|
|
1245
|
+
by?: "values" | "cellColor" | "fontColor";
|
|
1246
|
+
column?: string;
|
|
1247
|
+
customList?: Array<Json>;
|
|
1248
|
+
order?: "asc" | "desc";
|
|
1249
|
+
}>;
|
|
1250
|
+
matchCase?: boolean;
|
|
1251
|
+
orientation?: "rows" | "columns"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1252
|
+
range?: string;
|
|
1253
|
+
};
|
|
1254
|
+
/** Filter. Turns AutoFilter on or off for the current region (or range). Params: {range?} toggles AutoFilter on the current region. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1255
|
+
"data.filter": {
|
|
1256
|
+
range?: string;
|
|
1257
|
+
};
|
|
1258
|
+
/** Filter Column. Filters one column of the sheet's AutoFilter or of a table's own filter (its header's buttons) by values, blanks, a custom comparison or top/bottom items; rows that do not match are hidden. Params: {column: "B" (or 0-based offset), cell?: "B3" (a filter's header cell: which filter, the sheet's or a table's, and the column), table?: name (a table's own filter), values?: [..], blanks?: bool, custom?: {op: "="|"<>"|">"|">="|"<"|"<="|beginsWith|endsWith|contains|notContains, value: "10", op2?, value2?, and?}, top?: {count, bottom?, percent?}, aboveAverage?: bool, clear?: bool}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1259
|
+
"data.filterBy": {
|
|
1260
|
+
aboveAverage?: boolean;
|
|
1261
|
+
blanks?: boolean; /** like B3; a filter's header cell: which filter, the sheet's or a table's, and the column */
|
|
1262
|
+
cell?: string;
|
|
1263
|
+
clear?: boolean; /** like B; or 0-based offset */
|
|
1264
|
+
column?: string; /** {op: "="|"<>"|">"|">="|"<"|"<="|beginsWith|endsWith|contains|notContains, value: "10", op2?, value2?, and?} */
|
|
1265
|
+
custom?: {
|
|
1266
|
+
and?: Json;
|
|
1267
|
+
op?: Json;
|
|
1268
|
+
op2?: Json;
|
|
1269
|
+
value?: string;
|
|
1270
|
+
value2?: Json;
|
|
1271
|
+
}; /** read by the command beside its listed parameters */
|
|
1272
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1273
|
+
sheet?: Json; /** a table's own filter */
|
|
1274
|
+
table?: string; /** {count, bottom?, percent?} */
|
|
1275
|
+
top?: {
|
|
1276
|
+
bottom?: number;
|
|
1277
|
+
count?: number;
|
|
1278
|
+
percent?: Json;
|
|
1279
|
+
}; /** [..] */
|
|
1280
|
+
values?: Array<Json>;
|
|
1281
|
+
};
|
|
1282
|
+
/** Clear. Clears the criteria of the sheet's AutoFilter, or of a table's own filter when the call names it (cell, table) or the active cell's table when the sheet has no filter, so all its rows show again; the filter buttons stay. Params: {cell?: "B3" | table?: name (a table's filter; default the sheet's, or the active cell's table when the sheet has none)}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1283
|
+
"data.clearFilter": {
|
|
1284
|
+
cell?: string; /** a table's filter; default the sheet's, or the active cell's table when the sheet has none; one of several alternative parameters */
|
|
1285
|
+
table?: string;
|
|
1286
|
+
};
|
|
1287
|
+
/** Filter Values. Answers what a filter button's list shows for its column (the sheet's AutoFilter or a table's): the distinct values in sort order with how many rows hold each and whether they show, the blanks apart, the kind of values (text, number, date) and the column's criterion. Changes nothing. Params: {cell?: "B3" (a filter's header cell; default the active cell)} ? {range, table, column, header, kind: text|number|date, values: [{text, count, checked}], blanks: {count, checked}|null, criterion, filtered: [columns]}: what a filter button's list shows. Acts on `cell`. Reads the selection, part. */
|
|
1288
|
+
"data.filterValues": {
|
|
1289
|
+
cell?: string;
|
|
1290
|
+
};
|
|
1291
|
+
/** Reapply. Applies the active AutoFilter's criteria again after the data changed. Params: {}. Reads the part. Changes the document. */
|
|
1292
|
+
"data.reapply": Record<string, never>;
|
|
1293
|
+
/** Remove Duplicates. Deletes rows of a range that repeat earlier rows in the chosen columns; answers how many were removed. Params: {range?, columns?: ["A","C"], header?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1294
|
+
"data.removeDuplicates": {
|
|
1295
|
+
columns?: Array<string>;
|
|
1296
|
+
header?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1297
|
+
range?: string;
|
|
1298
|
+
};
|
|
1299
|
+
/** Text to Columns. Splits the text of a one-column range into several columns at delimiters or fixed widths. Params: {range?: str (an A1 range of one column; default the selection), delimiters?: [",", "?", " ", ";"] (each one character; tab is "?"), other?: str (one more delimiter character, e.g. "|"), fixedWidths?: [int] (column widths in characters, instead of delimiters), treatConsecutive?: bool, textQualifier?: str (one character that quotes a field; default the double quote), destination?: "B1" (the top-left cell of the result; default the range start)}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1300
|
+
"data.textToColumns": {
|
|
1301
|
+
delimiters?: Array<string>; /** like B1; the top-left cell of the result; default the range start */
|
|
1302
|
+
destination?: string; /** column widths in characters, instead of delimiters */
|
|
1303
|
+
fixedWidths?: Array<number>; /** one more delimiter character, e.g. "|" */
|
|
1304
|
+
other?: string; /** an A1 range of one column; default the selection */
|
|
1305
|
+
range?: string; /** one character that quotes a field; default the double quote */
|
|
1306
|
+
textQualifier?: string;
|
|
1307
|
+
treatConsecutive?: boolean;
|
|
1308
|
+
};
|
|
1309
|
+
/** Data Validation. Sets a data validation rule on a range (whole number, decimal, list, date, time, text length or custom formula) with input and error messages. Params: {range?, type: any|whole|decimal|list|date|time|textLength|custom, operator?: between|notBetween|equal|notEqual|greater|less|greaterOrEqual|lessOrEqual, formula1, formula2?, ignoreBlank?, dropdown?, showInput?: bool (default true), inputTitle?, inputMessage?, showError?: bool (default true), errorStyle?: stop|warning|information, errorTitle?, errorMessage?, clear?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1310
|
+
"data.validation": {
|
|
1311
|
+
clear?: boolean;
|
|
1312
|
+
dropdown?: boolean;
|
|
1313
|
+
errorMessage?: string;
|
|
1314
|
+
errorStyle?: "stop" | "warning" | "information";
|
|
1315
|
+
errorTitle?: string;
|
|
1316
|
+
formula1?: Json;
|
|
1317
|
+
formula2?: Json;
|
|
1318
|
+
ignoreBlank?: boolean;
|
|
1319
|
+
inputMessage?: string;
|
|
1320
|
+
inputTitle?: string;
|
|
1321
|
+
operator?: "between" | "notBetween" | "equal" | "notEqual" | "greater" | "less" | "greaterOrEqual" | "lessOrEqual"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1322
|
+
range?: string; /** default true */
|
|
1323
|
+
showError?: boolean; /** default true */
|
|
1324
|
+
showInput?: boolean;
|
|
1325
|
+
type?: "any" | "whole" | "decimal" | "list" | "date" | "time" | "textLength" | "custom";
|
|
1326
|
+
};
|
|
1327
|
+
/** Check Value Against Validation. Checks whether an input would pass a cell's data validation rule, without entering it; answers ok and the error message. Params: {cell?, input} ? {ok, message?}. Acts on `cell`. Reads the selection, part. */
|
|
1328
|
+
"data.validate": {
|
|
1329
|
+
cell?: string; /** text, a number, or a =formula */
|
|
1330
|
+
input?: string;
|
|
1331
|
+
};
|
|
1332
|
+
/** Circle Invalid Data. Lists the cells on the active sheet whose values break their data validation rule. Params: {} ? invalid cells. Reads the part. */
|
|
1333
|
+
"data.circleInvalid": Record<string, never>;
|
|
1334
|
+
/** Group. Groups rows (2:5) or columns (B:C) into an outline level that can be collapsed. Params: {rows?: "2:5" | cols?: "B:C"}. Reads the selection, part. Changes the document. */
|
|
1335
|
+
"data.group": {
|
|
1336
|
+
cols?: string; /** a row span such as 2:5; default: the selection's rows */
|
|
1337
|
+
rows?: string;
|
|
1338
|
+
};
|
|
1339
|
+
/** Ungroup. Removes an outline grouping from rows or columns. Params: {rows? | cols?}. Reads the selection, part. Changes the document. */
|
|
1340
|
+
"data.ungroup": {
|
|
1341
|
+
cols?: Json; /** a row span such as 2:5; default: the selection's rows */
|
|
1342
|
+
rows?: string;
|
|
1343
|
+
};
|
|
1344
|
+
/** Hide Detail. Collapses a group of rows or columns in the outline. Params: {rows? | cols?}. Reads the selection, part. Changes the document. */
|
|
1345
|
+
"data.hideDetail": {
|
|
1346
|
+
cols?: Json; /** a row span such as 2:5; default: the selection's rows */
|
|
1347
|
+
rows?: string;
|
|
1348
|
+
};
|
|
1349
|
+
/** Show Detail. Expands a collapsed group of rows or columns in the outline. Params: {rows? | cols?}. Reads the selection, part. Changes the document. */
|
|
1350
|
+
"data.showDetail": {
|
|
1351
|
+
cols?: Json; /** a row span such as 2:5; default: the selection's rows */
|
|
1352
|
+
rows?: string;
|
|
1353
|
+
};
|
|
1354
|
+
/** Subtotal. Inserts subtotal rows into a sorted list at each change in the groupBy column, summarising the given columns with a function. Params: {range?, groupBy: "A", function?: sum|count|average|max|min|product, columns: ["C"], header?: true}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1355
|
+
"data.subtotal": {
|
|
1356
|
+
columns?: Array<string>;
|
|
1357
|
+
function?: string; /** like A */
|
|
1358
|
+
groupBy?: string;
|
|
1359
|
+
header?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1360
|
+
range?: string;
|
|
1361
|
+
};
|
|
1362
|
+
/** Smart fill. Fills the empty cells of a column from the pattern of the examples above them (same as edit.smartFill). Params: {range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1363
|
+
"data.smartFill": {
|
|
1364
|
+
range?: string;
|
|
1365
|
+
};
|
|
1366
|
+
/** AutoSum. Inserts a SUM (or AVERAGE, COUNT, MAX, MIN) formula below or beside the selected numbers, guessing the range when none is given. Params: {function?: SUM|AVERAGE|COUNT|MAX|MIN, range?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1367
|
+
"formulas.autoSum": {
|
|
1368
|
+
enter?: boolean;
|
|
1369
|
+
function?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1370
|
+
range?: string;
|
|
1371
|
+
};
|
|
1372
|
+
/** Insert Function. Starts a formula with a function name in the active cell, as the Insert Function dialog would. Params: {name?: "VLOOKUP"} (UI opens the dialog; with a name, starts the formula in the active cell). Reads the selection, part. Changes the document. */
|
|
1373
|
+
"formulas.insertFunction": {
|
|
1374
|
+
name?: string;
|
|
1375
|
+
};
|
|
1376
|
+
/** List Functions. Lists the worksheet functions this sheet supports with their category, signature and description, optionally filtered by category or a search word. Params: {category?, search?} ? [{name, category, signature, description}]. */
|
|
1377
|
+
"formulas.functions": {
|
|
1378
|
+
category?: string;
|
|
1379
|
+
search?: string;
|
|
1380
|
+
};
|
|
1381
|
+
/** Define Name. Defines a named range or constant (default: the selection) at workbook or sheet scope, usable in formulas. Params: {name, refersTo?: "=Sheet1!$A$1:$A$10" (default: the selection), scope?: "Workbook"|sheet name, comment?}. Reads the selection, part. Changes the document. */
|
|
1382
|
+
"formulas.defineName": {
|
|
1383
|
+
comment?: string;
|
|
1384
|
+
name?: string; /** like =Sheet1!$A$1:$A$10; default: the selection */
|
|
1385
|
+
refersTo?: string; /** Workbook or a sheet name */
|
|
1386
|
+
scope?: string;
|
|
1387
|
+
};
|
|
1388
|
+
/** Delete Name. Deletes a defined name in one scope, or in every scope when none is given; formulas that used it show #NAME?. Params: {name, scope?: "Workbook"|sheet name (default: every scope)}. Changes the document. */
|
|
1389
|
+
"formulas.deleteName": {
|
|
1390
|
+
name?: string; /** Workbook or a sheet name */
|
|
1391
|
+
scope?: string;
|
|
1392
|
+
};
|
|
1393
|
+
/** Name Manager. Lists every defined name with its scope, what it refers to and its current value. Params: {} ? names with values. Reads the part. */
|
|
1394
|
+
"formulas.nameManager": Record<string, never>;
|
|
1395
|
+
/** Create from Selection. Creates names for the rows or columns of a range from its top row or left column labels; existing names are kept unless replace is true. Params: {range?, top?: true, left?: false, bottom?: false, right?: false, replace?: false (existing names are kept and listed in `skipped`)}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1396
|
+
"formulas.createFromSelection": {
|
|
1397
|
+
bottom?: boolean;
|
|
1398
|
+
left?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1399
|
+
range?: string; /** existing names are kept and listed in `skipped` */
|
|
1400
|
+
replace?: boolean;
|
|
1401
|
+
right?: boolean;
|
|
1402
|
+
top?: boolean;
|
|
1403
|
+
};
|
|
1404
|
+
/** Trace Precedents. Answers the cells and ranges a cell's formula reads (default: the active cell), without changing the sheet. Params: {cell?} ? ranges. Acts on `cell`. Reads the selection, part. */
|
|
1405
|
+
"formulas.tracePrecedents": {
|
|
1406
|
+
cell?: string;
|
|
1407
|
+
};
|
|
1408
|
+
/** Trace Dependents. Answers the cells whose formulas read a cell (default: the active cell), without changing the sheet. Params: {cell?} ? cells. Acts on `cell`. Reads the selection, part. */
|
|
1409
|
+
"formulas.traceDependents": {
|
|
1410
|
+
cell?: string;
|
|
1411
|
+
};
|
|
1412
|
+
/** Remove Arrows. Hides the trace arrows drawn by trace precedents and dependents. Params: {}. */
|
|
1413
|
+
"formulas.removeArrows": Record<string, never>;
|
|
1414
|
+
/** Show Formulas. Shows formulas instead of their results in the cells of the sheet, or turns that off. Params: {on?}. Reads the part. Changes the document. */
|
|
1415
|
+
"formulas.showFormulas": {
|
|
1416
|
+
on?: boolean;
|
|
1417
|
+
};
|
|
1418
|
+
/** Error Checking. Lists cells whose formulas end in errors (#DIV/0!, #REF!, #NAME?...) and circular references on the active sheet. Params: {} ? cells with errors. */
|
|
1419
|
+
"formulas.errorChecking": Record<string, never>;
|
|
1420
|
+
/** Evaluate Formula. Evaluates a cell's formula (or a given formula) step by step and answers each intermediate step. Params: {cell?, formula?} ? steps. Acts on `cell`. Reads the selection, part. */
|
|
1421
|
+
"formulas.evaluateFormula": {
|
|
1422
|
+
cell?: string; /** a formula starting with = */
|
|
1423
|
+
formula?: string;
|
|
1424
|
+
};
|
|
1425
|
+
/** Evaluate. Calculates a formula as if it were in a cell (default: the active cell) and answers its value without writing anything to the sheet. Params: {formula: "=SUM(A1:A3)", cell?} ? value without changing the sheet. Acts on `cell`. Reads the selection, part. */
|
|
1426
|
+
"formulas.evaluate": {
|
|
1427
|
+
cell?: string; /** like =SUM(A1:A3) */
|
|
1428
|
+
formula?: string;
|
|
1429
|
+
};
|
|
1430
|
+
/** Calculate Now. Recalculates every formula in the workbook now (F9) and answers how many cells were calculated; needed in manual calculation mode. Params: {}. */
|
|
1431
|
+
"formulas.calculateNow": Record<string, never>;
|
|
1432
|
+
/** Calculate Sheet. Recalculates the formulas of the active sheet only and answers how many cells were calculated. Params: {}. */
|
|
1433
|
+
"formulas.calculateSheet": Record<string, never>;
|
|
1434
|
+
/** Calculation Options. Sets the workbook's calculation mode (automatic, automatic except tables, manual) and iterative calculation limits. Params: {mode: automatic|automaticExceptTables|manual, iterative?, maxIterations?, maxChange?}. Changes the document. */
|
|
1435
|
+
"formulas.calculationOptions": {
|
|
1436
|
+
iterative?: boolean;
|
|
1437
|
+
maxChange?: number;
|
|
1438
|
+
maxIterations?: number;
|
|
1439
|
+
mode?: "automatic" | "automaticExceptTables" | "manual";
|
|
1440
|
+
};
|
|
1441
|
+
/** Protect Sheet. Protects the active sheet so locked cells cannot be edited, with an optional password and the actions still allowed (formatting, inserting rows, sorting...). Params: {password?, formatCells?, formatColumns?, formatRows?, insertRows?, insertColumns?, deleteRows?, deleteColumns?, sort?, autofilter?}. Reads the part. Changes the document. */
|
|
1442
|
+
"review.protectSheet": {
|
|
1443
|
+
autofilter?: boolean;
|
|
1444
|
+
deleteColumns?: boolean;
|
|
1445
|
+
deleteRows?: boolean;
|
|
1446
|
+
formatCells?: boolean;
|
|
1447
|
+
formatColumns?: boolean;
|
|
1448
|
+
formatRows?: boolean;
|
|
1449
|
+
insertColumns?: boolean;
|
|
1450
|
+
insertRows?: boolean;
|
|
1451
|
+
password?: string; /** read by the command beside its listed parameters */
|
|
1452
|
+
sheet?: Json;
|
|
1453
|
+
sort?: boolean;
|
|
1454
|
+
};
|
|
1455
|
+
/** Unprotect Sheet. Removes protection from the active sheet, with its password when it has one. Params: {password?}. Reads the part. Changes the document. */
|
|
1456
|
+
"review.unprotectSheet": {
|
|
1457
|
+
password?: string; /** read by the command beside its listed parameters */
|
|
1458
|
+
sheet?: Json;
|
|
1459
|
+
};
|
|
1460
|
+
/** Protect Workbook. Protects or unprotects the workbook's structure so sheets cannot be added, deleted, moved or renamed. Params: {on?: bool}. Changes the document. */
|
|
1461
|
+
"review.protectWorkbook": {
|
|
1462
|
+
on?: boolean;
|
|
1463
|
+
};
|
|
1464
|
+
/** Workbook Statistics. Answers counts for the active sheet and workbook: cells with data, formulas, sheets, tables, charts, comments and the last used cell. Params: {}. Reads the part. */
|
|
1465
|
+
"review.workbookStatistics": Record<string, never>;
|
|
1466
|
+
/** Check Accessibility. Lists accessibility issues in the workbook, such as pictures without alternative text or merged cells, with where they are. Params: {} ? issues. */
|
|
1467
|
+
"review.checkAccessibility": Record<string, never>;
|
|
1468
|
+
/** Freeze Panes. Freezes the rows above and the columns to the left of a cell (default: the active cell) so they stay visible while scrolling. Params: {cell?: "B2" (rows above and columns left of it freeze), top?: "A11" (the view's top-left cell: the panes start there, rows above and columns left of it stay out of view, as WPS freezes a scrolled view)}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1469
|
+
"view.freezePanes": {
|
|
1470
|
+
cell?: string; /** like A11; the view's top-left cell: the panes start there, rows above and columns left of it stay out of view, as WPS freezes a scrolled view */
|
|
1471
|
+
top?: string;
|
|
1472
|
+
};
|
|
1473
|
+
/** Freeze Top Row. Freezes the first row of the active sheet so it stays visible while scrolling. Params: {top?: "A11"}. Reads the part. Changes the document. */
|
|
1474
|
+
"view.freezeTopRow": {
|
|
1475
|
+
top?: string;
|
|
1476
|
+
};
|
|
1477
|
+
/** Freeze First Column. Freezes the first column of the active sheet so it stays visible while scrolling. Params: {top?: "D1"}. Reads the part. Changes the document. */
|
|
1478
|
+
"view.freezeFirstColumn": {
|
|
1479
|
+
top?: string;
|
|
1480
|
+
};
|
|
1481
|
+
/** Freeze to Current Row. Freezes the rows above a cell (default: the active cell) and no columns, replacing any frozen panes (WPS's Freeze to Row). Fails on the first row. Params: {cell?: "C5", top?: "A11"} (the rows above it freeze, no columns; WPS's ???? 4 ?). Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1482
|
+
"view.freezeRows": {
|
|
1483
|
+
cell?: string; /** like A11 */
|
|
1484
|
+
top?: string;
|
|
1485
|
+
};
|
|
1486
|
+
/** Freeze to Current Column. Freezes the columns left of a cell (default: the active cell) and no rows, replacing any frozen panes (WPS's Freeze to Column). Fails on the first column. Params: {cell?: "C5", top?: "A11"} (the columns left of it freeze, no rows; WPS's ???? B ?). Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1487
|
+
"view.freezeColumns": {
|
|
1488
|
+
cell?: string; /** like A11 */
|
|
1489
|
+
top?: string;
|
|
1490
|
+
};
|
|
1491
|
+
/** Unfreeze Panes. Removes frozen panes from the active sheet. Params: {}. Reads the part. Changes the document. */
|
|
1492
|
+
"view.unfreezePanes": Record<string, never>;
|
|
1493
|
+
/** Gridlines. Shows or hides the cell gridlines of the active sheet on screen; use pageLayout.printGridlines for printing. Params: {on?}. Reads the part. Changes the document. */
|
|
1494
|
+
"view.gridlines": {
|
|
1495
|
+
on?: boolean;
|
|
1496
|
+
};
|
|
1497
|
+
/** Gridline Color. Sets the colour of the active sheet's gridlines on screen and on printed pages, or back to the automatic grey with "auto". Saved with the sheet. Params: {color: "#RRGGBB" | "auto"} (the active sheet's gridlines; saved with it). Reads the part. Changes the document. */
|
|
1498
|
+
"view.gridlineColor": {
|
|
1499
|
+
color?: string;
|
|
1500
|
+
};
|
|
1501
|
+
/** Focus Cell. Highlights the rows and columns of the selection across the grid in a colour (WPS's Highlight Rows and Columns, Excel's Focus Cell). It is the person's view, as the formula bar is: the workbook does not change (no undo step, nothing to save). Params: {on?, color?: "#RRGGBB"} (without `on` or `color`: toggles) ? {on, color}; highlights the selection's rows and columns (WPS's ????, the person's view, not saved with the workbook). */
|
|
1502
|
+
"view.focusCell": {
|
|
1503
|
+
color?: string; /** true turns it on, false off; left out with no color, it toggles */
|
|
1504
|
+
on?: boolean;
|
|
1505
|
+
};
|
|
1506
|
+
/** Headings. Shows or hides the row and column headings of the active sheet. Params: {on?}. Reads the part. Changes the document. */
|
|
1507
|
+
"view.headings": {
|
|
1508
|
+
on?: boolean;
|
|
1509
|
+
};
|
|
1510
|
+
/** Formula Bar. Shows or hides the formula bar. It is the person's view of every workbook, as in Excel and WPS: the workbook does not change (no undo step, nothing to save). Params: {on?} (without `on`: toggles) ? {on}; the person's view, not saved with the workbook. */
|
|
1511
|
+
"view.formulaBar": {
|
|
1512
|
+
on?: boolean;
|
|
1513
|
+
};
|
|
1514
|
+
/** Show Zeros. Shows zero values as 0 or as empty cells on the active sheet. Params: {on?}. Reads the part. Changes the document. */
|
|
1515
|
+
"view.showZeros": {
|
|
1516
|
+
on?: boolean;
|
|
1517
|
+
};
|
|
1518
|
+
/** Sheet Right-to-Left. Lays out the active sheet from right to left (column A on the right), or back. Params: {on?}. Reads the part. Changes the document. */
|
|
1519
|
+
"view.rightToLeft": {
|
|
1520
|
+
on?: boolean;
|
|
1521
|
+
};
|
|
1522
|
+
/** Zoom. Sets the zoom of the view to a percentage from 10 to 400; changes nothing in the workbook. Params: {percent: 10..400}. Reads the part. */
|
|
1523
|
+
"view.zoom": {
|
|
1524
|
+
percent?: number;
|
|
1525
|
+
};
|
|
1526
|
+
/** Zoom to Selection. Zooms the view so the selection fills the window and answers the zoom percentage. Params: {viewWidth?, viewHeight?}. Reads the selection, part. */
|
|
1527
|
+
"view.zoomToSelection": {
|
|
1528
|
+
viewHeight?: number;
|
|
1529
|
+
viewWidth?: number;
|
|
1530
|
+
};
|
|
1531
|
+
/** Orientation. Sets the active sheet's printed page orientation to portrait or landscape. Params: {orientation: portrait|landscape}. Reads the part. Changes the document. */
|
|
1532
|
+
"pageLayout.orientation": {
|
|
1533
|
+
orientation?: "portrait" | "landscape";
|
|
1534
|
+
};
|
|
1535
|
+
/** Size. Sets the active sheet's paper size (Letter, Legal, A4, A3...). Params: {paper: Letter|Legal|A4|A3|A5|Tabloid|Executive}. Reads the part. Changes the document. */
|
|
1536
|
+
"pageLayout.size": {
|
|
1537
|
+
paper?: "Letter" | "Legal" | "A4" | "A3" | "A5" | "Tabloid" | "Executive";
|
|
1538
|
+
};
|
|
1539
|
+
/** Margins. Sets the active sheet's page margins from a preset or in inches per side, including header and footer distance. Params: {preset?: normal|wide|narrow, left?, right?, top?, bottom?, header?, footer? (inches)}. Reads the part. Changes the document. */
|
|
1540
|
+
"pageLayout.margins": {
|
|
1541
|
+
bottom?: number; /** inches */
|
|
1542
|
+
footer?: number; /** inches */
|
|
1543
|
+
header?: number;
|
|
1544
|
+
left?: number;
|
|
1545
|
+
preset?: "normal" | "wide" | "narrow";
|
|
1546
|
+
right?: number;
|
|
1547
|
+
top?: number;
|
|
1548
|
+
};
|
|
1549
|
+
/** Set Print Area. Sets the range that prints for the active sheet (default: the selection), or clears it. Params: {range?, clear?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1550
|
+
"pageLayout.printArea": {
|
|
1551
|
+
clear?: boolean; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1552
|
+
range?: string;
|
|
1553
|
+
};
|
|
1554
|
+
/** Print Titles. Sets rows (such as 1:1) and columns (such as A:A) that repeat on every printed page. Params: {rows?: "1:1", cols?: "A:A"}. Reads the part. Changes the document. */
|
|
1555
|
+
"pageLayout.printTitles": {
|
|
1556
|
+
cols?: string; /** like 1:1 */
|
|
1557
|
+
rows?: string;
|
|
1558
|
+
};
|
|
1559
|
+
/** Scale to Fit. Scales printing by a percentage, or fits the sheet to a number of pages wide and tall. Params: {scale?: 100, width?: pages, height?: pages}. Reads the part. Changes the document. */
|
|
1560
|
+
"pageLayout.scaleToFit": {
|
|
1561
|
+
height?: number;
|
|
1562
|
+
scale?: number; /** pages wide */
|
|
1563
|
+
width?: number;
|
|
1564
|
+
};
|
|
1565
|
+
/** Print Gridlines. Turns printing of gridlines on or off for the active sheet. Params: {on?}. Reads the part. Changes the document. */
|
|
1566
|
+
"pageLayout.printGridlines": {
|
|
1567
|
+
on?: boolean;
|
|
1568
|
+
};
|
|
1569
|
+
/** Print Headings. Turns printing of row and column headings on or off for the active sheet. Params: {on?}. Reads the part. Changes the document. */
|
|
1570
|
+
"pageLayout.printHeadings": {
|
|
1571
|
+
on?: boolean;
|
|
1572
|
+
};
|
|
1573
|
+
/** Breaks. Inserts or removes a manual page break at a cell, or resets all page breaks of the sheet. Params: {insert?: bool, remove?: bool, reset?: bool, cell?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1574
|
+
"pageLayout.breaks": {
|
|
1575
|
+
cell?: string;
|
|
1576
|
+
insert?: boolean;
|
|
1577
|
+
remove?: boolean;
|
|
1578
|
+
reset?: boolean;
|
|
1579
|
+
};
|
|
1580
|
+
/** Header & Footer. Sets the printed header and footer using codes such as &C&P (page number, centred) and &N (page count). Params: {header?: "&C&P", footer?: "&CPage &P of &N"}. Reads the part. Changes the document. */
|
|
1581
|
+
"pageLayout.headerFooter": {
|
|
1582
|
+
footer?: string; /** like &C&P */
|
|
1583
|
+
header?: string;
|
|
1584
|
+
};
|
|
1585
|
+
/** Themes. Applies a document theme (colours and fonts), by name or with custom colours and fonts; styles that use theme colours change with it. Params: {name: Classic|Slate|Meadow|Ember|Ocean|Orchid|Graphite, colors?: [12 hex], majorFont?, minorFont?}. Changes the document. */
|
|
1586
|
+
"pageLayout.theme": {
|
|
1587
|
+
colors?: Array<Json>;
|
|
1588
|
+
majorFont?: string;
|
|
1589
|
+
minorFont?: string;
|
|
1590
|
+
name?: "Classic" | "Slate" | "Meadow" | "Ember" | "Ocean" | "Orchid" | "Graphite";
|
|
1591
|
+
};
|
|
1592
|
+
/** Inspect Workbook. Answers the workbook's structure: sheets, active sheet and cell, selection, defined names, tables, charts, calculation mode, unsaved state and undo history. Use sheet.read or cell.get for cell contents. Params: {} ? sheets, selection, names, tables, charts, dirty, history. Reads the selection, part, mode. */
|
|
1593
|
+
"document.inspect": Record<string, never>;
|
|
1594
|
+
/** 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. Params: {range?: "A1:D10" (default: used range), sheet?, formulas?: bool, formatted?: bool} ? rows of values. Acts on `range`. Reads the selection, part. */
|
|
1595
|
+
"sheet.read": {
|
|
1596
|
+
formatted?: boolean;
|
|
1597
|
+
formulas?: boolean; /** like A1:D10; default: used range */
|
|
1598
|
+
range?: string;
|
|
1599
|
+
sheet?: Json;
|
|
1600
|
+
};
|
|
1601
|
+
/** Get Cell. Answers everything about one cell: its value, formula, display text, style, merge, comment, note and link. Params: {cell?, sheet?} ? value, formula, display text, style, comment, link. Acts on `cell`. Reads the selection, part. */
|
|
1602
|
+
"cell.get": {
|
|
1603
|
+
cell?: string;
|
|
1604
|
+
sheet?: Json;
|
|
1605
|
+
};
|
|
1606
|
+
/** Selection Statistics. Answers count, numeric count, sum, average, minimum and maximum of the selected cells, as the status bar shows. Params: {} ? count, sum, average, min, max. Reads the selection, part. */
|
|
1607
|
+
"selection.stats": Record<string, never>;
|
|
1608
|
+
/** Undo History. Answers the labels of the undo and redo steps. Params: {} ? undo/redo labels. */
|
|
1609
|
+
"history.list": Record<string, never>;
|
|
1610
|
+
/** List Commands. Lists the sheet's commands with their ids, labels and parameter notes, optionally filtered by a search word. Params: {search?} ? ids, labels, params. */
|
|
1611
|
+
"app.commands": {
|
|
1612
|
+
search?: string;
|
|
1613
|
+
};
|
|
1614
|
+
/** Add Chart Element. Adds or removes a chart element (title, legend, data labels, gridlines, axis titles, smooth lines) with its position. Params: {chart?, element: title|legend|dataLabels|gridlines|axisTitles|smooth, on?: bool, position?: bottom|top|left|right}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1615
|
+
"chart.addElement": {
|
|
1616
|
+
chart?: Json;
|
|
1617
|
+
element?: "title" | "legend" | "dataLabels" | "gridlines" | "axisTitles" | "smooth";
|
|
1618
|
+
on?: boolean;
|
|
1619
|
+
position?: "bottom" | "top" | "left" | "right";
|
|
1620
|
+
};
|
|
1621
|
+
/** Quick Layout. Applies one of the six quick layouts to a chart (which elements it shows and where). Params: {chart?, layout: 1..6}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1622
|
+
"chart.quickLayout": {
|
|
1623
|
+
chart?: Json; /** 1 to 6 */
|
|
1624
|
+
layout?: number;
|
|
1625
|
+
};
|
|
1626
|
+
/** Change Colors. Recolours a chart from a palette (colourful, monochrome, an accent) or a list of hex colours: its series in turn, or a pie's or doughnut's slices. Params: {chart?, palette?: colorful|monochrome|accent1..accent6, colors?: [hex...]} (a pie's or doughnut's slices take the colours in turn). Acts on `chart`. Reads the part. Changes the document. */
|
|
1627
|
+
"chart.changeColors": {
|
|
1628
|
+
chart?: Json; /** hex colours such as #4472C4, given to the series (or slices) in turn; instead of palette */
|
|
1629
|
+
colors?: Array<string>; /** colorful, monochrome or accent1 to accent6 */
|
|
1630
|
+
palette?: string;
|
|
1631
|
+
};
|
|
1632
|
+
/** Select Data. Changes the data range a chart plots, optionally with series by rows. Params: {chart?, range: "Sheet1!A1:D7", byRows?: bool}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1633
|
+
"chart.selectData": {
|
|
1634
|
+
byRows?: boolean; /** a chart id from document.inspect; default: the selected chart */
|
|
1635
|
+
chart?: Json; /** like Sheet1!A1:D7 */
|
|
1636
|
+
range?: string;
|
|
1637
|
+
};
|
|
1638
|
+
/** Change Chart Type. Changes a chart's type (column, line, pie...) and subtype, keeping its data. Params: {chart?, type, subtype?}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1639
|
+
"chart.changeType": {
|
|
1640
|
+
chart?: Json;
|
|
1641
|
+
subtype?: string; /** a chart type such as column, bar, line, pie */
|
|
1642
|
+
type?: string;
|
|
1643
|
+
};
|
|
1644
|
+
/** Move Chart. Moves a chart to another sheet or to a cell position. Params: {chart?, sheet?: name (moves to that sheet), at?: "B2"}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1645
|
+
"chart.move": {
|
|
1646
|
+
at?: string; /** a chart id from document.inspect; default: the selected chart */
|
|
1647
|
+
chart?: Json; /** moves to that sheet */
|
|
1648
|
+
sheet?: string;
|
|
1649
|
+
};
|
|
1650
|
+
/** Format Selection. Sets the colour of one series of a chart, by its 0-based index. Params: {chart?, series?: index, color?: hex}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1651
|
+
"chart.formatSelection": {
|
|
1652
|
+
chart?: Json; /** a colour such as #rrggbb */
|
|
1653
|
+
color?: string; /** a position counted from 0 (the first is 0) */
|
|
1654
|
+
series?: number;
|
|
1655
|
+
};
|
|
1656
|
+
/** Shape Fill. Sets the fill colour of a chart (or a series of it) or of a shape. Params: {chart? | kind: shape, id?, series?, color: hex}. Acts on `chart`. Reads the part. Changes the document. */
|
|
1657
|
+
"chart.shapeFill": {
|
|
1658
|
+
chart?: Json; /** a colour such as #rrggbb */
|
|
1659
|
+
color?: string; /** an id */
|
|
1660
|
+
id?: Json;
|
|
1661
|
+
kind?: "shape"; /** a series counted from 0 */
|
|
1662
|
+
series?: number;
|
|
1663
|
+
};
|
|
1664
|
+
/** Shape Outline. Sets the outline colour of a shape. Params: {kind: shape, id?, color: hex}. Acts on `id`. Reads the part. Changes the document. */
|
|
1665
|
+
"chart.shapeOutline": {
|
|
1666
|
+
color?: string; /** an id */
|
|
1667
|
+
id?: Json;
|
|
1668
|
+
kind?: "shape";
|
|
1669
|
+
};
|
|
1670
|
+
/** Bring Forward. Brings a chart, image or shape one step forward, or to the front, in the stacking order. Params: {kind: chart|image|shape, id, toFront?: bool}. Acts on `id`. Reads the part. Changes the document. */
|
|
1671
|
+
"arrange.bringForward": {
|
|
1672
|
+
id?: Json;
|
|
1673
|
+
kind?: "chart" | "image" | "shape"; /** read by the command beside its listed parameters */
|
|
1674
|
+
toBack?: boolean;
|
|
1675
|
+
toFront?: boolean;
|
|
1676
|
+
};
|
|
1677
|
+
/** Send Backward. Sends a chart, image or shape one step backward, or to the back, in the stacking order. Params: {kind: chart|image|shape, id, toBack?: bool}. Acts on `id`. Reads the part. Changes the document. */
|
|
1678
|
+
"arrange.sendBackward": {
|
|
1679
|
+
id?: Json;
|
|
1680
|
+
kind?: "chart" | "image" | "shape";
|
|
1681
|
+
toBack?: boolean; /** read by the command beside its listed parameters */
|
|
1682
|
+
toFront?: boolean;
|
|
1683
|
+
};
|
|
1684
|
+
/** Selection Pane. Lists the objects on the active sheet (charts, images, shapes) in stacking order with their ids. Params: {} ? objects on the sheet in stacking order. Reads the part. */
|
|
1685
|
+
"arrange.selectionPane": Record<string, never>;
|
|
1686
|
+
/** Align. Aligns several objects of one kind by their left, centre, right, top, middle or bottom edges. Params: {kind: chart|image|shape, ids: [..], align: left|center|right|top|middle|bottom}. Reads the part. Changes the document. */
|
|
1687
|
+
"arrange.align": {
|
|
1688
|
+
align?: "left" | "center" | "right" | "top" | "middle" | "bottom"; /** [..] */
|
|
1689
|
+
ids?: Array<Json>;
|
|
1690
|
+
kind?: "chart" | "image" | "shape";
|
|
1691
|
+
};
|
|
1692
|
+
/** Group. Moves several objects so their anchors align to the first, so they move together. Params: {kind, ids} (moves objects together: aligns their anchors to the first). Acts on `ids`. Reads the part. Changes the document. */
|
|
1693
|
+
"arrange.group": {
|
|
1694
|
+
ids?: Array<Json>;
|
|
1695
|
+
kind?: "chart" | "image" | "shape";
|
|
1696
|
+
};
|
|
1697
|
+
/** Rotate. Rotates a shape by 90 degrees or flips it horizontally or vertically. Params: {kind: shape, id, flip?: horizontal|vertical} (swaps width/height for 90? turns). Acts on `id`. Reads the part. Changes the document. */
|
|
1698
|
+
"arrange.rotate": {
|
|
1699
|
+
flip?: "horizontal" | "vertical"; /** an id */
|
|
1700
|
+
id?: Json;
|
|
1701
|
+
kind?: "shape";
|
|
1702
|
+
};
|
|
1703
|
+
/** Normal. Switches the view to Normal; answers the view. Params: {}. */
|
|
1704
|
+
"view.normal": Record<string, never>;
|
|
1705
|
+
/** Page Layout. Switches the view to Page Layout, which shows pages as they print; answers the view. Params: {}. */
|
|
1706
|
+
"view.pageLayout": Record<string, never>;
|
|
1707
|
+
/** Page Break Preview. Switches the view to Page Break Preview, which shows where pages break; answers the view. Params: {}. */
|
|
1708
|
+
"view.pageBreakPreview": Record<string, never>;
|
|
1709
|
+
/** Custom Views. Saves, shows or deletes a named custom view of the sheet (zoom, frozen panes, filters) and answers the list of saved views. Params: {save?: name, show?: name, delete?: name} ? list. Reads the selection, part. Changes the document. */
|
|
1710
|
+
"view.customViews": {
|
|
1711
|
+
delete?: string;
|
|
1712
|
+
save?: string;
|
|
1713
|
+
show?: string;
|
|
1714
|
+
};
|
|
1715
|
+
/** Split. Toggles a split of the window at the active cell (shown as frozen panes) and answers the frozen cell. Params: {} (toggles a split at the active cell; shown as frozen panes in this version). Reads the selection, part. Changes the document. */
|
|
1716
|
+
"view.split": Record<string, never>;
|
|
1717
|
+
/** New Window. Opens a second window on the same workbook. Params: {} opens a second window on the same workbook (a linked copy). Reads the selection, part. Changes the document. */
|
|
1718
|
+
"view.newWindow": Record<string, never>;
|
|
1719
|
+
/** Arrange All. Arranges the open windows side by side in the editor. Params: {}. */
|
|
1720
|
+
"view.arrangeAll": Record<string, never>;
|
|
1721
|
+
/** Hide. Hides the current workbook window. Params: {}. */
|
|
1722
|
+
"view.hideWindow": Record<string, never>;
|
|
1723
|
+
/** Unhide. Shows a hidden window by index. Params: {index?}. */
|
|
1724
|
+
"view.unhideWindow": {
|
|
1725
|
+
index?: number;
|
|
1726
|
+
};
|
|
1727
|
+
/** Switch Windows. Lists the open windows with their index, title and whether each is active or hidden. Params: {} ? open windows. */
|
|
1728
|
+
"view.switchWindows": Record<string, never>;
|
|
1729
|
+
/** Ruler. Shows or hides the ruler in Page Layout view. Params: {on?}. */
|
|
1730
|
+
"view.ruler": {
|
|
1731
|
+
on?: boolean;
|
|
1732
|
+
};
|
|
1733
|
+
/** Macros. Lists the saved automation scripts that can run as macros. Params: {} ? scripts. */
|
|
1734
|
+
"view.macros": Record<string, never>;
|
|
1735
|
+
/** Resize Table. Resizes a table to a new range that keeps the same header row. Params: {table?, range: "A1:F20"}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1736
|
+
"table.resize": {
|
|
1737
|
+
range?: string; /** a table name; default: the table at the active cell */
|
|
1738
|
+
table?: string;
|
|
1739
|
+
};
|
|
1740
|
+
/** Remove Duplicates. Deletes table rows that repeat earlier rows in the chosen columns (default: all columns). Params: {table?, columns?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1741
|
+
"table.removeDuplicates": {
|
|
1742
|
+
columns?: Array<Json>; /** read by the command beside its listed parameters */
|
|
1743
|
+
range?: string; /** a table name; default: the table at the active cell */
|
|
1744
|
+
table?: string;
|
|
1745
|
+
};
|
|
1746
|
+
/** From Text/CSV. Imports CSV or delimited text (from a path or inline text) into a new sheet as a table. Params: {path | text, delimiter?: ",", sheet?: new sheet name} ? imports into a new sheet as a table. Reads the selection, part. Changes the document. */
|
|
1747
|
+
"data.fromTextCsv": {
|
|
1748
|
+
delimiter?: string; /** one of several alternative parameters */
|
|
1749
|
+
path?: Json;
|
|
1750
|
+
sheet?: Json; /** one of several alternative parameters */
|
|
1751
|
+
text?: string;
|
|
1752
|
+
};
|
|
1753
|
+
/** Get Data. Imports CSV, TSV or a JSON array of objects (from a path or inline text) into a new sheet as a table. Params: {path | text} (CSV/TSV/JSON array of objects) ? new sheet table. Reads the selection, part. Changes the document. */
|
|
1754
|
+
"data.getData": {
|
|
1755
|
+
path?: Json; /** one of several alternative parameters */
|
|
1756
|
+
text?: string;
|
|
1757
|
+
};
|
|
1758
|
+
/** From Table/Range. Copies a table or range (default: the current region) to a new sheet as a table. Params: {range?} ? copies the table/range to a new sheet as a table. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1759
|
+
"data.fromTableRange": {
|
|
1760
|
+
range?: string;
|
|
1761
|
+
};
|
|
1762
|
+
/** Queries & Connections. Lists the tables imported from text or files, with their sources. Params: {} ? imported tables. */
|
|
1763
|
+
"data.queriesConnections": Record<string, never>;
|
|
1764
|
+
/** Record Actions. Starts recording actions into a script, or stops and saves the recording under a name; answers whether it is recording. Params: {stop?: bool, name?: script name when stopping}. Changes the document. */
|
|
1765
|
+
"automate.recordActions": {
|
|
1766
|
+
name?: string;
|
|
1767
|
+
stop?: boolean;
|
|
1768
|
+
};
|
|
1769
|
+
/** New Script. Saves a script: a named list of commands with their parameters, to run later with automate.runScript. Params: {name, commands: [{command, params}] }. Changes the document. */
|
|
1770
|
+
"automate.newScript": {
|
|
1771
|
+
commands?: Array<{
|
|
1772
|
+
command?: Json;
|
|
1773
|
+
params?: Json;
|
|
1774
|
+
}>;
|
|
1775
|
+
name?: string;
|
|
1776
|
+
};
|
|
1777
|
+
/** All Scripts. Lists the saved scripts with their names and steps. Params: {} ? saved scripts. */
|
|
1778
|
+
"automate.allScripts": Record<string, never>;
|
|
1779
|
+
/** Run Script. Runs a saved script's commands in order, as one undo step. Params: {name}. Reads the selection, part, mode. Changes the document. */
|
|
1780
|
+
"automate.runScript": {
|
|
1781
|
+
name?: string;
|
|
1782
|
+
};
|
|
1783
|
+
/** Delete Script. Deletes a saved script by name. Params: {name}. Changes the document. */
|
|
1784
|
+
"automate.deleteScript": {
|
|
1785
|
+
name?: string;
|
|
1786
|
+
};
|
|
1787
|
+
/** Checkbox. Turns the cells of a range (a merged area's first cell) into checkboxes: each holds FALSE unless it held TRUE or FALSE, and what else was in it (text, a formula, a picture) goes. Refused across part of an array formula. A checkbox is the cell's content: Clear Contents removes it; Clear Formats, the format painter and Paste Special ? Formats leave it. Params: {range?} (cells hold TRUE/FALSE and draw as checkboxes; Space toggles). Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1788
|
+
"insert.checkbox": {
|
|
1789
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1790
|
+
sheet?: Json;
|
|
1791
|
+
};
|
|
1792
|
+
/** Toggle Checkbox. Ticks or clears a checkbox cell (default: every checkbox of the selection), as a click on its box and Space do; cells without a checkbox are left alone. Answers how many were toggled. Params: {cell?}. Acts on `cell`. Reads the selection, part. Changes the document. */
|
|
1793
|
+
"cell.toggleCheckbox": {
|
|
1794
|
+
cell?: string; /** read by the command beside its listed parameters */
|
|
1795
|
+
sheet?: Json;
|
|
1796
|
+
};
|
|
1797
|
+
/** Colors. Sets the theme's colour scheme by name or as twelve hex colours. Params: {name: theme name | colors: [12 hex]}. Changes the document. */
|
|
1798
|
+
"pageLayout.themeColors": {
|
|
1799
|
+
colors?: Array<Json>;
|
|
1800
|
+
name?: string;
|
|
1801
|
+
};
|
|
1802
|
+
/** Fonts. Sets the theme's heading (major) and body (minor) fonts. Params: {major, minor}. Changes the document. */
|
|
1803
|
+
"pageLayout.themeFonts": {
|
|
1804
|
+
major?: string;
|
|
1805
|
+
minor?: string;
|
|
1806
|
+
};
|
|
1807
|
+
/** Effects. Sets the theme's chart effects preset by name. Params: {name} (chart effects preset; stored with the theme name). Changes the document. */
|
|
1808
|
+
"pageLayout.themeEffects": {
|
|
1809
|
+
name?: string;
|
|
1810
|
+
};
|
|
1811
|
+
/** Background. Sets a picture file as the active sheet's background, or clears it. Params: {path? | clear?: bool} (sheet background picture). Reads the part. Changes the document. */
|
|
1812
|
+
"pageLayout.background": {
|
|
1813
|
+
base64?: string; /** one of several alternative parameters */
|
|
1814
|
+
clear?: boolean; /** one of several alternative parameters */
|
|
1815
|
+
path?: Json;
|
|
1816
|
+
};
|
|
1817
|
+
/** Draw Border. Draws a border on one edge (top, bottom, left, right) or as a grid on a range, with a line style and colour. Params: {range, edge: top|bottom|left|right|grid, style?, color?}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
1818
|
+
"home.drawBorder": {
|
|
1819
|
+
color?: string;
|
|
1820
|
+
edge?: "top" | "bottom" | "left" | "right" | "grid"; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1821
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
1822
|
+
sheet?: Json;
|
|
1823
|
+
style?: string;
|
|
1824
|
+
};
|
|
1825
|
+
/** New Cell Style. Creates a named cell style from a cell's formatting (default: the active cell) for use with home.cellStyle. Params: {name, fromCell?: "A1" (default: active cell)}. Reads the selection, part. Changes the document. */
|
|
1826
|
+
"home.newCellStyle": {
|
|
1827
|
+
fromCell?: string;
|
|
1828
|
+
name?: string;
|
|
1829
|
+
};
|
|
1830
|
+
/** Add-ins. Answers that the sheet has no add-ins and points to the agent and scripts instead. Params: {} ? Kition Sheet extends through the agent and scripts instead of add-ins. */
|
|
1831
|
+
"home.addIns": Record<string, never>;
|
|
1832
|
+
/** Recently Used. Lists the functions used most recently in this workbook's formulas. Params: {} ? recently used functions in this workbook. */
|
|
1833
|
+
"formulas.recentlyUsed": Record<string, never>;
|
|
1834
|
+
/** Financial. Lists the financial worksheet functions with their signatures and descriptions. Params: {}. */
|
|
1835
|
+
"formulas.financial": Record<string, never>;
|
|
1836
|
+
/** Logical. Lists the logical worksheet functions (IF, AND, OR...) with their signatures and descriptions. Params: {}. */
|
|
1837
|
+
"formulas.logical": Record<string, never>;
|
|
1838
|
+
/** Text. Lists the text worksheet functions with their signatures and descriptions. Params: {}. */
|
|
1839
|
+
"formulas.text": Record<string, never>;
|
|
1840
|
+
/** Date & Time. Lists the date and time worksheet functions with their signatures and descriptions. Params: {}. */
|
|
1841
|
+
"formulas.dateTime": Record<string, never>;
|
|
1842
|
+
/** Lookup & Reference. Lists the lookup and reference worksheet functions (XLOOKUP, INDEX, MATCH...) with their signatures and descriptions. Params: {}. */
|
|
1843
|
+
"formulas.lookupReference": Record<string, never>;
|
|
1844
|
+
/** Math & Trig. Lists the math and trigonometry worksheet functions with their signatures and descriptions. Params: {}. */
|
|
1845
|
+
"formulas.mathTrig": Record<string, never>;
|
|
1846
|
+
/** More Functions. Lists the worksheet functions of another category (Statistical, Engineering, Information, Database...). Params: {category?: Statistical|Engineering|Information|Database|Compatibility|Web|Cube}. */
|
|
1847
|
+
"formulas.moreFunctions": {
|
|
1848
|
+
category?: "Statistical" | "Engineering" | "Information" | "Database" | "Compatibility" | "Web" | "Cube";
|
|
1849
|
+
};
|
|
1850
|
+
/** Use in Formula. Inserts a defined name into the formula being edited in the active cell. Params: {name} (inserts the name into the cell being edited). Changes the document. */
|
|
1851
|
+
"formulas.useInFormula": {
|
|
1852
|
+
name?: string;
|
|
1853
|
+
};
|
|
1854
|
+
/** Watch Window. Adds or removes a cell from the watch window and answers the watched cells with their current values. Params: {add?: "Sheet1!B5", remove?: "..."} ? watched cells with current values. Reads the part. Changes the document. */
|
|
1855
|
+
"formulas.watchWindow": {
|
|
1856
|
+
add?: string; /** like ... */
|
|
1857
|
+
remove?: string;
|
|
1858
|
+
};
|
|
1859
|
+
/** Pen. Selects the pen ink tool in the editor with a colour and width, or turns it off; answers the tool state. Params: {on?: bool (default true), color?: hex, width?: 2}. Reads the mode. */
|
|
1860
|
+
"draw.pen": {
|
|
1861
|
+
color?: string; /** default true */
|
|
1862
|
+
on?: boolean;
|
|
1863
|
+
width?: number;
|
|
1864
|
+
};
|
|
1865
|
+
/** Pencil. Selects the pencil ink tool in the editor with a colour and width; answers the tool state. Params: {on?: bool (default true), color?: hex, width?: 1}. Reads the mode. */
|
|
1866
|
+
"draw.pencil": {
|
|
1867
|
+
color?: string; /** default true */
|
|
1868
|
+
on?: boolean;
|
|
1869
|
+
width?: number;
|
|
1870
|
+
};
|
|
1871
|
+
/** Highlighter. Selects the highlighter ink tool in the editor with a colour and width; answers the tool state. Params: {on?: bool (default true), color?: hex, width?: 12}. Reads the mode. */
|
|
1872
|
+
"draw.highlighter": {
|
|
1873
|
+
color?: string; /** default true */
|
|
1874
|
+
on?: boolean;
|
|
1875
|
+
width?: number;
|
|
1876
|
+
};
|
|
1877
|
+
/** Eraser. Selects the ink eraser tool in the editor; answers the tool state. Params: {on?: bool (default true)}. Reads the mode. */
|
|
1878
|
+
"draw.eraser": {
|
|
1879
|
+
on?: boolean;
|
|
1880
|
+
};
|
|
1881
|
+
/** Select. Switches the editor back to selecting objects; answers the tool state. Params: {}. Reads the mode. */
|
|
1882
|
+
"draw.select": Record<string, never>;
|
|
1883
|
+
/** Draw Shape. Selects a DrawingML shape preset to draw next in the editor, or none; answers it. Params: {preset: DrawingML preset | null}. Reads the mode. */
|
|
1884
|
+
"draw.shape": {
|
|
1885
|
+
preset?: Json;
|
|
1886
|
+
};
|
|
1887
|
+
/** Draw State. Answers the editor's current ink tool, colour and width. Params: {}. Reads the mode. */
|
|
1888
|
+
"draw.state": Record<string, never>;
|
|
1889
|
+
/** Lasso Select. Selects the lasso tool for picking ink strokes in the editor. Params: {} (selects ink by dragging; same as Select Objects). */
|
|
1890
|
+
"draw.lasso": Record<string, never>;
|
|
1891
|
+
/** Ink Stroke. Adds one ink stroke through points given in sheet points, with a colour and width. Params: {points: [[x,y],...] in sheet points, color?: hex, width?: 2}. Reads the mode, part. Changes the document. */
|
|
1892
|
+
"draw.stroke": {
|
|
1893
|
+
color?: string; /** [x, y] points in sheet points */
|
|
1894
|
+
points?: Array<Array<number>>; /** read by the command beside its listed parameters */
|
|
1895
|
+
tool?: string;
|
|
1896
|
+
width?: number;
|
|
1897
|
+
};
|
|
1898
|
+
/** Ink to Shape. Converts an ink stroke (default: the last one) into the rectangle, ellipse, triangle or line it resembles. Params: {id?} converts an ink stroke (default: the last) into a rectangle, ellipse, triangle or line. Acts on `id`. Reads the part. Changes the document. */
|
|
1899
|
+
"draw.inkToShape": {
|
|
1900
|
+
color?: string; /** an id */
|
|
1901
|
+
id?: Json; /** read by the command beside its listed parameters */
|
|
1902
|
+
tool?: string; /** read by the command beside its listed parameters */
|
|
1903
|
+
width?: number;
|
|
1904
|
+
};
|
|
1905
|
+
/** Draw Ink Strokes. Adds ink strokes (pen, pencil or highlighter) through points in sheet points; use drawing.describe to read them back. Params: {strokes: [{tool?: pen|pencil|highlighter, color?, width?, points: [[x, y, pressure?], ...]}]} (sheet points; members left out take the current pen). Reads the mode, part. Changes the document. */
|
|
1906
|
+
"drawing.ink": {
|
|
1907
|
+
strokes?: Array<{
|
|
1908
|
+
color?: string;
|
|
1909
|
+
points?: Array<Json>;
|
|
1910
|
+
tool?: "pen" | "pencil" | "highlighter";
|
|
1911
|
+
width?: number;
|
|
1912
|
+
}>;
|
|
1913
|
+
};
|
|
1914
|
+
/** Erase Ink. Deletes the ink strokes that a path or a circle touches. Params: {path: [[x, y], ...] | x, y, radius?} (deletes the strokes the path touches). Reads the selection, part. Changes the document. */
|
|
1915
|
+
"drawing.erase": {
|
|
1916
|
+
path?: string;
|
|
1917
|
+
radius?: number; /** read by the command beside its listed parameters */
|
|
1918
|
+
x?: number;
|
|
1919
|
+
y?: number;
|
|
1920
|
+
};
|
|
1921
|
+
/** Describe Drawing Objects. Answers the sheet's drawing objects (shapes, text boxes, charts, ink, groups) with ids, geometry, fill, stroke and text; default: the selected object or every shape. Params: {ids?} (default: the selected object, else every shape on the sheet). Acts on `ids`. Reads the selection, part. */
|
|
1922
|
+
"drawing.describe": {
|
|
1923
|
+
ids?: Array<Json>;
|
|
1924
|
+
};
|
|
1925
|
+
/** Insert Drawing Object. Inserts a drawing object (shape, text box or chart) with geometry, a frame in sheet points, placement, fill, stroke and text; answers its id. Params: {kind?: shape|textBox|chart, geometry?: {preset, adjust?}, frame?: {x,y,w,h,rot?,flipH?,flipV?} (sheet points), placement?: {kind: cell, mode?}, fill?, stroke?, text?, chart?: {kind?, title?, legend?, dataLabels?, gridlines?, xTitle?, yTitle?} (a chart of the selected cells, or of `range`), range?}. Reads the selection, part. Changes the document. */
|
|
1926
|
+
"drawing.insert": {
|
|
1927
|
+
body?: Json; /** {kind?, title?, legend?, dataLabels?, gridlines?, xTitle?, yTitle?} (a chart of the selected cells, or of `range`); a chart of the selected cells, or of `range` */
|
|
1928
|
+
chart?: {
|
|
1929
|
+
dataLabels?: Json;
|
|
1930
|
+
gridlines?: Json;
|
|
1931
|
+
kind?: Json;
|
|
1932
|
+
legend?: Json;
|
|
1933
|
+
title?: string;
|
|
1934
|
+
xTitle?: Json;
|
|
1935
|
+
yTitle?: Json;
|
|
1936
|
+
};
|
|
1937
|
+
fill?: Json; /** {x,y,w,h,rot?,flipH?,flipV?} (sheet points); sheet points */
|
|
1938
|
+
frame?: {
|
|
1939
|
+
flipH?: Json;
|
|
1940
|
+
flipV?: Json;
|
|
1941
|
+
h?: number;
|
|
1942
|
+
rot?: Json;
|
|
1943
|
+
w?: number;
|
|
1944
|
+
x?: number;
|
|
1945
|
+
y?: number;
|
|
1946
|
+
}; /** {preset, adjust?} */
|
|
1947
|
+
geometry?: {
|
|
1948
|
+
adjust?: Json;
|
|
1949
|
+
preset?: string;
|
|
1950
|
+
};
|
|
1951
|
+
kind?: "shape" | "textBox" | "chart"; /** read by the command beside its listed parameters */
|
|
1952
|
+
paragraphs?: Array<Json>; /** {kind: cell, mode?} */
|
|
1953
|
+
placement?: {
|
|
1954
|
+
kind?: Json;
|
|
1955
|
+
mode?: Json;
|
|
1956
|
+
}; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
1957
|
+
range?: string;
|
|
1958
|
+
stroke?: Json;
|
|
1959
|
+
text?: string; /** read by the command beside its listed parameters */
|
|
1960
|
+
warp?: Json;
|
|
1961
|
+
};
|
|
1962
|
+
/** Delete Drawing Objects. Deletes drawing objects by their ids from drawing.describe. Params: {ids}. Acts on `ids`. Reads the selection, part. Changes the document. */
|
|
1963
|
+
"drawing.delete": {
|
|
1964
|
+
id?: Json;
|
|
1965
|
+
ids?: Array<Json>;
|
|
1966
|
+
};
|
|
1967
|
+
/** Transform Drawing Objects. Moves, resizes, rotates or flips drawing objects by id, to a frame or by offsets. Params: {ids, frame? | dx?, dy?, rotateBy?, flipH?, flipV?}. Acts on `ids`. Reads the part. Changes the document. */
|
|
1968
|
+
"drawing.transform": {
|
|
1969
|
+
dx?: number;
|
|
1970
|
+
dy?: number;
|
|
1971
|
+
flipH?: boolean;
|
|
1972
|
+
flipV?: boolean;
|
|
1973
|
+
frame?: {
|
|
1974
|
+
flipH?: boolean;
|
|
1975
|
+
flipV?: boolean;
|
|
1976
|
+
h?: number;
|
|
1977
|
+
rot?: number;
|
|
1978
|
+
w?: number;
|
|
1979
|
+
x?: number;
|
|
1980
|
+
y?: number;
|
|
1981
|
+
}; /** read by the command beside its listed parameters */
|
|
1982
|
+
id?: Json;
|
|
1983
|
+
ids?: Array<Json>; /** degrees */
|
|
1984
|
+
rotateBy?: number;
|
|
1985
|
+
};
|
|
1986
|
+
/** Format Drawing Objects. Changes the fill, stroke or geometry of drawing objects by id. Params: {ids, fill?, stroke?, geometry?}. Acts on `ids`. Reads the part. Changes the document. */
|
|
1987
|
+
"drawing.format": {
|
|
1988
|
+
effects?: Json;
|
|
1989
|
+
fill?: Json;
|
|
1990
|
+
geometry?: Json; /** read by the command beside its listed parameters */
|
|
1991
|
+
id?: Json;
|
|
1992
|
+
ids?: Array<Json>;
|
|
1993
|
+
stroke?: Json;
|
|
1994
|
+
};
|
|
1995
|
+
/** Set Drawing Object Text. Replaces the text of a drawing object, as plain text or as formatted paragraphs. Params: {id, text? | paragraphs?}. Acts on `id`. Reads the part. Changes the document. */
|
|
1996
|
+
"drawing.text": {
|
|
1997
|
+
body?: Json; /** an id */
|
|
1998
|
+
id?: Json; /** one of several alternative parameters */
|
|
1999
|
+
paragraphs?: Json; /** one of several alternative parameters */
|
|
2000
|
+
text?: string; /** read by the command beside its listed parameters */
|
|
2001
|
+
warp?: Json;
|
|
2002
|
+
};
|
|
2003
|
+
/** Reconnect Connector. Moves one end of a connector to another object's connection site or to a point. Params: {id, end: start|end, to?: id, site?: n, point?: [x, y]}. Acts on `id`. Reads the part. Changes the document. */
|
|
2004
|
+
"drawing.reconnect": {
|
|
2005
|
+
end?: "start" | "end"; /** an id */
|
|
2006
|
+
id?: Json;
|
|
2007
|
+
point?: Array<number>;
|
|
2008
|
+
site?: number; /** an id */
|
|
2009
|
+
to?: Json;
|
|
2010
|
+
};
|
|
2011
|
+
/** Connect Drawing Objects. Draws a connector between two objects, straight, bent or curved, attached to their connection sites. Params: {from, to, fromSite?, toSite?, geometry?: {preset: straightConnector1|bentConnector3|curvedConnector3}}. Reads the part. Changes the document. */
|
|
2012
|
+
"drawing.connect": {
|
|
2013
|
+
from?: Json;
|
|
2014
|
+
fromSite?: number;
|
|
2015
|
+
geometry?: {
|
|
2016
|
+
preset?: "straightConnector1" | "bentConnector3" | "curvedConnector3";
|
|
2017
|
+
}; /** an object id from drawing.describe */
|
|
2018
|
+
to?: Json;
|
|
2019
|
+
toSite?: number;
|
|
2020
|
+
};
|
|
2021
|
+
/** Group Drawing Objects. Groups two or more top-level drawing objects into one group. Params: {ids} (two or more shapes or groups on the sheet, not in a group). Acts on `ids`. Reads the part. Changes the document. */
|
|
2022
|
+
"drawing.group": {
|
|
2023
|
+
ids?: Array<Json>;
|
|
2024
|
+
};
|
|
2025
|
+
/** Ungroup Drawing Objects. Splits groups back into their objects. Params: {ids} (groups). Acts on `ids`. Reads the part. Changes the document. */
|
|
2026
|
+
"drawing.ungroup": {
|
|
2027
|
+
ids?: Array<Json>;
|
|
2028
|
+
};
|
|
2029
|
+
/** Arrange Drawing Objects. Moves drawing objects to the front, back, or one step in the stacking order; charts stay above shapes. Params: {ids, order: front|back|forward|backward} (charts stay above shapes). Acts on `ids`. Reads the part. Changes the document. */
|
|
2030
|
+
"drawing.arrange": {
|
|
2031
|
+
ids?: Array<Json>;
|
|
2032
|
+
order?: "front" | "back" | "forward" | "backward";
|
|
2033
|
+
};
|
|
2034
|
+
/** Change Chart. Changes a chart drawing object: its kind, title, legend, data labels, gridlines, axis titles and series, and each series' format (seriesFormat). Params: {id, kind?, title?: text|null, legend?: top|bottom|left|right|null, dataLabels?, gridlines?, xTitle?, yTitle?, series?: [{name, values, color?}] (colours only: the data are the cells)}. Reads the part. Changes the document. */
|
|
2035
|
+
"drawing.chart": {
|
|
2036
|
+
categories?: Json; /** read by the command beside its listed parameters */
|
|
2037
|
+
dataLabelPosition?: string;
|
|
2038
|
+
dataLabels?: Json;
|
|
2039
|
+
gridlines?: Json; /** an id */
|
|
2040
|
+
id?: Json; /** read by the command beside its listed parameters */
|
|
2041
|
+
ids?: Array<Json>; /** a chart kind such as column, bar, line, pie */
|
|
2042
|
+
kind?: string;
|
|
2043
|
+
legend?: Json; /** [{name, values, color?}] (colours only: the data are the cells); colours only: the data are the cells */
|
|
2044
|
+
series?: Array<{
|
|
2045
|
+
color?: string;
|
|
2046
|
+
name?: string;
|
|
2047
|
+
values?: Json;
|
|
2048
|
+
}>; /** per series, by index from 0: {index, kind?: column|stackedColumn|bar|line|lineMarkers|area|scatter (a series of another type than the chart's makes it a combination; null: the chart's), secondary?: bool (the second value axis), color?: "#RRGGBB", lineWidth?: points, marker?: none|circle|square|diamond|triangle|x|star|dash|dot|plus, smooth?: bool, trendline?: linear|exp|log|poly|power|movingAvg or {kind, order?, period?, forward?, backward?}|null, errorBars?: {kind: fixedVal|percentage|stdDev|stdErr, value?}|null} */
|
|
2049
|
+
seriesFormat?: Array<Json>;
|
|
2050
|
+
title?: Json; /** read by the command beside its listed parameters */
|
|
2051
|
+
xAxis?: Json;
|
|
2052
|
+
xTitle?: string; /** read by the command beside its listed parameters */
|
|
2053
|
+
yAxis?: Json;
|
|
2054
|
+
yTitle?: string;
|
|
2055
|
+
};
|
|
2056
|
+
/** Spelling. Checks spelling in a range or sheet and answers misspelled words with their cells and suggestions; changes nothing. Params: {range?, sheet?} ? misspelled words with cells and suggestions. Acts on `range`. Reads the selection, part. */
|
|
2057
|
+
"review.spelling": {
|
|
2058
|
+
range?: string;
|
|
2059
|
+
sheet?: Json;
|
|
2060
|
+
};
|
|
2061
|
+
/** Add to Dictionary. Adds a word to the dictionary so spelling no longer reports it. Params: {word}. */
|
|
2062
|
+
"review.addToDictionary": {
|
|
2063
|
+
word?: string;
|
|
2064
|
+
};
|
|
2065
|
+
/** Change. Replaces a misspelled word in a cell, or in every cell when all is true. Params: {cell, word, to, all?: bool}. Acts on `cell`. Reads the part. Changes the document. */
|
|
2066
|
+
"review.changeSpelling": {
|
|
2067
|
+
all?: boolean; /** one cell in A1 notation such as B2; default: the active cell */
|
|
2068
|
+
cell?: string;
|
|
2069
|
+
to?: string;
|
|
2070
|
+
word?: string;
|
|
2071
|
+
};
|
|
2072
|
+
/** Thesaurus. Answers words related to a word from the dictionary (sharing its stem). Params: {word} ? related words (words sharing the stem in the dictionary). */
|
|
2073
|
+
"review.thesaurus": {
|
|
2074
|
+
word?: string;
|
|
2075
|
+
};
|
|
2076
|
+
/** Pivot table. Creates a pivot table from a source range or table (default: around the selection) on a new sheet or at a destination, optionally with rows, columns and values. Params: {source?: "Sheet1!$A$1:$E$200" | table name (default: the table or current region of the selection), destination?: "new" (default: new sheet before the current one, report at A3) | "Sheet1!H3", name?, rows?: [field | {field, group?: years|quarters|months|days}], columns?: [..], values?: [field | {field, func?, name?}], filters?: [field], replace?: bool} ? {id, name, sheet, anchor, fields}. Reads the selection, part. Changes the document. */
|
|
2077
|
+
"insert.pivotTable": {
|
|
2078
|
+
columns?: Array<Json>; /** default: new sheet before the current one, report at A3 */
|
|
2079
|
+
destination?: "new" | "Sheet1!H3"; /** [field] */
|
|
2080
|
+
filters?: Array<Json>;
|
|
2081
|
+
name?: string;
|
|
2082
|
+
replace?: boolean; /** [field | {field, group?: years|quarters|months|days}] */
|
|
2083
|
+
rows?: Array<Json>; /** a range in A1 notation such as Sheet1!$A$1:$E$200, or a table name */
|
|
2084
|
+
source?: string; /** [field | {field, func?, name?}] */
|
|
2085
|
+
values?: Array<Json>;
|
|
2086
|
+
};
|
|
2087
|
+
/** Recommended Pivot Tables. Suggests pivot table layouts for a source and answers them; with apply, creates the suggestion at that index. Params: {source?, apply?: index, destination?} ? suggestions [{index, title, rows, columns, values}]; with apply, creates that one. Reads the selection, part. Changes the document. */
|
|
2088
|
+
"insert.recommendedPivotTables": {
|
|
2089
|
+
apply?: number; /** a cell in A1 notation, or "new" for a new sheet */
|
|
2090
|
+
destination?: string; /** a range in A1 notation such as Sheet1!$A$1:$E$200, or a table name */
|
|
2091
|
+
source?: string;
|
|
2092
|
+
};
|
|
2093
|
+
/** Summarize with Pivot Table. Creates a pivot table from a table (default: the table at the active cell). Params: {table?, destination?} creates a pivot table from the table. Reads the selection, part. Changes the document. */
|
|
2094
|
+
"table.summarizePivot": {
|
|
2095
|
+
columns?: Array<Json>; /** a cell in A1 notation, or "new" for a new sheet */
|
|
2096
|
+
destination?: string; /** read by the command beside its listed parameters */
|
|
2097
|
+
filters?: Array<Json>; /** read by the command beside its listed parameters */
|
|
2098
|
+
location?: string; /** read by the command beside its listed parameters */
|
|
2099
|
+
name?: string; /** read by the command beside its listed parameters */
|
|
2100
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
2101
|
+
replace?: boolean; /** read by the command beside its listed parameters */
|
|
2102
|
+
rows?: Json; /** read by the command beside its listed parameters */
|
|
2103
|
+
source?: Json; /** a table name; default: the table at the active cell */
|
|
2104
|
+
table?: string; /** read by the command beside its listed parameters */
|
|
2105
|
+
values?: Array<Json>;
|
|
2106
|
+
};
|
|
2107
|
+
/** Pivot Table Fields. Answers a pivot table's source fields (name, numeric, date, sample values) and its current layout; select a cell in the pivot table or name it. Params: {pivot?} ? source fields (name, numeric, date, samples, areas) and the current layout. Reads the selection, part. */
|
|
2108
|
+
"pivot.fields": {
|
|
2109
|
+
pivot?: Json;
|
|
2110
|
+
};
|
|
2111
|
+
/** Field List. Answers a pivot table's fields and layout (same as pivot.fields). Params: {pivot?} (same as pivot.fields). Reads the selection, part. */
|
|
2112
|
+
"pivot.fieldList": {
|
|
2113
|
+
pivot?: Json;
|
|
2114
|
+
};
|
|
2115
|
+
/** Pivot tables. Lists every pivot table in the workbook with its name, sheet, location and source. Params: {} ? every pivot table in the workbook. */
|
|
2116
|
+
"pivot.list": Record<string, never>;
|
|
2117
|
+
/** Add Field. Adds a source field to a pivot table's rows, columns, values or filters, with the summary function for values. Params: {pivot?, field, area: rows|columns|values|filters, func?: sum|count|average|max|min|product|countNumbers|stdDev|stdDevP|var|varP, name?, position?: index, replace?}. Reads the selection, part. Changes the document. */
|
|
2118
|
+
"pivot.addField": {
|
|
2119
|
+
area?: "rows" | "columns" | "values" | "filters"; /** a source field name or a value field caption */
|
|
2120
|
+
field?: string;
|
|
2121
|
+
func?: string;
|
|
2122
|
+
name?: string; /** default: the pivot table at the active cell */
|
|
2123
|
+
pivot?: Json; /** a position counted from 0 (the first is 0) */
|
|
2124
|
+
position?: number; /** replace the existing pivot table output in place */
|
|
2125
|
+
replace?: boolean;
|
|
2126
|
+
};
|
|
2127
|
+
/** Remove Field. Removes a field (or a value caption) from a pivot table area. Params: {pivot?, field (or value caption), area?: rows|columns|values|filters, replace?}. Reads the selection, part. Changes the document. */
|
|
2128
|
+
"pivot.removeField": {
|
|
2129
|
+
area?: "rows" | "columns" | "values" | "filters"; /** a source field name or a value field caption */
|
|
2130
|
+
field?: string; /** default: the pivot table at the active cell */
|
|
2131
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2132
|
+
replace?: boolean;
|
|
2133
|
+
};
|
|
2134
|
+
/** Move Field. Moves a field between pivot table areas or to a position within one. Params: {pivot?, field, from: rows|columns|values|filters, to: rows|columns|values|filters, position?: index, replace?}. Reads the selection, part. Changes the document. */
|
|
2135
|
+
"pivot.moveField": {
|
|
2136
|
+
field?: string;
|
|
2137
|
+
from?: "rows" | "columns" | "values" | "filters"; /** default: the pivot table at the active cell */
|
|
2138
|
+
pivot?: Json; /** a position counted from 0 (the first is 0) */
|
|
2139
|
+
position?: number; /** replace the existing pivot table output in place */
|
|
2140
|
+
replace?: boolean;
|
|
2141
|
+
to?: "rows" | "columns" | "values" | "filters";
|
|
2142
|
+
};
|
|
2143
|
+
/** Value Field Settings. Changes a pivot table value field's summary function, caption or show-as calculation (percent of total, running total...). Params: {pivot?, field: caption or source field | index: n, func?, name?, showAs?: normal|percentOfGrandTotal|percentOfColumnTotal|percentOfRowTotal|runningTotal|rank, numberFormat?: "#,##0" | null, replace?}. Reads the selection, part. Changes the document. */
|
|
2144
|
+
"pivot.valueSettings": {
|
|
2145
|
+
field?: string;
|
|
2146
|
+
func?: string; /** one of several alternative parameters */
|
|
2147
|
+
index?: number;
|
|
2148
|
+
name?: string; /** a number format code such as #,##0 */
|
|
2149
|
+
numberFormat?: string; /** default: the pivot table at the active cell */
|
|
2150
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2151
|
+
replace?: boolean;
|
|
2152
|
+
showAs?: "normal" | "percentOfGrandTotal" | "percentOfColumnTotal" | "percentOfRowTotal" | "runningTotal" | "rank";
|
|
2153
|
+
};
|
|
2154
|
+
/** Filter Items. Shows only the chosen items of a pivot table field, or all items with null. Params: {pivot?, field, selected: ["East", ..] | null (all), replace?}. Reads the selection, part. Changes the document. */
|
|
2155
|
+
"pivot.filter": {
|
|
2156
|
+
field?: string; /** default: the pivot table at the active cell */
|
|
2157
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2158
|
+
replace?: boolean;
|
|
2159
|
+
selected?: Json;
|
|
2160
|
+
};
|
|
2161
|
+
/** Sort Field. Sorts a pivot table field's items ascending or descending, or back to source order. Params: {pivot?, field, order: asc|desc|none, replace?}. Reads the selection, part. Changes the document. */
|
|
2162
|
+
"pivot.sort": {
|
|
2163
|
+
field?: string;
|
|
2164
|
+
order?: "asc" | "desc" | "none"; /** default: the pivot table at the active cell */
|
|
2165
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2166
|
+
replace?: boolean;
|
|
2167
|
+
};
|
|
2168
|
+
/** Group Field. Groups a pivot table date field by years, quarters, months or days, or ungroups it. Params: {pivot?, field, by: years|quarters|months|days|none, replace?}. Reads the selection, part. Changes the document. */
|
|
2169
|
+
"pivot.group": {
|
|
2170
|
+
by?: "years" | "quarters" | "months" | "days" | "none"; /** a source field name or a value field caption */
|
|
2171
|
+
field?: string; /** default: the pivot table at the active cell */
|
|
2172
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2173
|
+
replace?: boolean;
|
|
2174
|
+
};
|
|
2175
|
+
/** Expand/Collapse Field. Collapses or expands items of a pivot table field (default: all items). Params: {pivot?, field, items?: [labels] (default: all), collapse?: true, replace?}. Reads the selection, part. Changes the document. */
|
|
2176
|
+
"pivot.collapse": {
|
|
2177
|
+
collapse?: boolean; /** a source field name or a value field caption */
|
|
2178
|
+
field?: string; /** [labels] (default: all); default: all */
|
|
2179
|
+
items?: Array<Json>; /** default: the pivot table at the active cell */
|
|
2180
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2181
|
+
replace?: boolean;
|
|
2182
|
+
};
|
|
2183
|
+
/** Pivot Table Layout. Sets a pivot table's layout form, grand totals, subtotals and style in one call. Params: {pivot?, layout?: compact|outline|tabular, grandTotalsRows?: bool, grandTotalsCols?: bool, subtotals?: bool|top|bottom|none, style?: "PivotStyleLight16", showHeaders?: bool, replace?}. Reads the selection, part. Changes the document. */
|
|
2184
|
+
"pivot.layout": {
|
|
2185
|
+
grandTotalsCols?: boolean;
|
|
2186
|
+
grandTotalsRows?: boolean;
|
|
2187
|
+
layout?: "compact" | "outline" | "tabular"; /** default: the pivot table at the active cell */
|
|
2188
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2189
|
+
replace?: boolean;
|
|
2190
|
+
showHeaders?: boolean; /** like PivotStyleLight16 */
|
|
2191
|
+
style?: string;
|
|
2192
|
+
subtotals?: Json;
|
|
2193
|
+
};
|
|
2194
|
+
/** Grand Totals. Turns a pivot table's grand totals off or on, for rows, columns or both. Params: {pivot?, mode?: off|on|rows|columns, rows?: bool, cols?: bool}. Reads the selection, part. Changes the document. */
|
|
2195
|
+
"pivot.grandTotals": {
|
|
2196
|
+
cols?: boolean;
|
|
2197
|
+
mode?: "off" | "on" | "rows" | "columns"; /** default: the pivot table at the active cell */
|
|
2198
|
+
pivot?: Json;
|
|
2199
|
+
rows?: boolean;
|
|
2200
|
+
};
|
|
2201
|
+
/** Subtotals. Shows a pivot table's subtotals at the top or bottom of each group, or hides them. Params: {pivot?, mode: none|top|bottom}. Reads the selection, part. Changes the document. */
|
|
2202
|
+
"pivot.subtotals": {
|
|
2203
|
+
mode?: "none" | "top" | "bottom"; /** default: the pivot table at the active cell */
|
|
2204
|
+
pivot?: Json;
|
|
2205
|
+
};
|
|
2206
|
+
/** Report Layout. Sets a pivot table's report layout to compact, outline or tabular form. Params: {pivot?, layout: compact|outline|tabular}. Reads the selection, part. Changes the document. */
|
|
2207
|
+
"pivot.reportLayout": {
|
|
2208
|
+
layout?: "compact" | "outline" | "tabular"; /** default: the pivot table at the active cell */
|
|
2209
|
+
pivot?: Json;
|
|
2210
|
+
};
|
|
2211
|
+
/** Pivot Table Styles. Applies a pivot table style such as PivotStyleMedium9. Params: {pivot?, style: "PivotStyleMedium9"}. Reads the selection, part. Changes the document. */
|
|
2212
|
+
"pivot.style": {
|
|
2213
|
+
pivot?: Json; /** like PivotStyleMedium9 */
|
|
2214
|
+
style?: string;
|
|
2215
|
+
};
|
|
2216
|
+
/** Refresh. Recalculates a pivot table from its source data. Params: {pivot?, replace?}. Reads the selection, part. Changes the document. */
|
|
2217
|
+
"pivot.refresh": {
|
|
2218
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2219
|
+
replace?: boolean;
|
|
2220
|
+
};
|
|
2221
|
+
/** Refresh All. Refreshes every pivot table in the workbook from its source and answers which refreshed and which failed. Params: {replace?} refreshes every pivot table ? {refreshed, errors}. Changes the document. */
|
|
2222
|
+
"data.refreshAll": {
|
|
2223
|
+
replace?: boolean;
|
|
2224
|
+
};
|
|
2225
|
+
/** Change Data Source. Points a pivot table at a new source range or table; fields missing from the new source are removed. Params: {pivot?, source: "Sheet1!$A$1:$E$300" | table name, replace?} (fields missing from the new source are removed). Reads the selection, part. Changes the document. */
|
|
2226
|
+
"pivot.changeSource": {
|
|
2227
|
+
pivot?: Json; /** replace the existing pivot table output in place */
|
|
2228
|
+
replace?: boolean; /** a range in A1 notation such as Sheet1!$A$1:$E$200, or a table name */
|
|
2229
|
+
source?: string;
|
|
2230
|
+
};
|
|
2231
|
+
/** Delete Pivot Table. Deletes a pivot table and clears the cells it occupied. Params: {pivot?} clears the report and removes the pivot table. Reads the selection, part. Changes the document. */
|
|
2232
|
+
"pivot.delete": {
|
|
2233
|
+
pivot?: Json;
|
|
2234
|
+
};
|
|
2235
|
+
/** Goal Seek. Finds the value of a constant cell that makes a formula cell reach a target and writes it; answers the value, result and whether it converged. Params: {set: "B5" (formula cell), to: number, changing: "B2" (constant cell)} ? {value, result, iterations, converged}. Secant search with bisection once the answer is bracketed; stops within Maximum Change (0.001) or after Maximum Iterations (100) from File ? Options ? Formulas. Writes the found value into `changing`. Acts on `changing`. Reads the part. Changes the document. */
|
|
2236
|
+
"data.goalSeek": {
|
|
2237
|
+
changing?: string; /** like B5; formula cell */
|
|
2238
|
+
set?: string;
|
|
2239
|
+
to?: number;
|
|
2240
|
+
};
|
|
2241
|
+
/** Scenario Manager. Lists the what-if scenarios of the active sheet (or every sheet with *) with their changing cells and values. Params: {sheet?} ? {scenarios: [{name, sheet, changing, values, comment}]} (scenarios of the active sheet; `sheet: "*"` lists all). Reads the part. */
|
|
2242
|
+
"data.scenarioManager": {
|
|
2243
|
+
sheet?: Json;
|
|
2244
|
+
};
|
|
2245
|
+
/** Add Scenario. Saves a what-if scenario: a name, up to 32 changing cells and their values (default: the current values). Params: {name, changing: "B2:B4" or "B2,B4" (?32 cells, active sheet), values?: [..] (default: the cells' current values), comment?, replace?: bool}. Reads the part. Changes the document. */
|
|
2246
|
+
"data.scenarioAdd": {
|
|
2247
|
+
changing?: string;
|
|
2248
|
+
comment?: string;
|
|
2249
|
+
name?: string;
|
|
2250
|
+
replace?: boolean; /** [..] (default: the cells' current values); default: the cells' current values */
|
|
2251
|
+
values?: Array<Json>;
|
|
2252
|
+
};
|
|
2253
|
+
/** Show Scenario. Writes a scenario's values into its changing cells. Params: {name} writes the scenario's values into its changing cells. Reads the part. Changes the document. */
|
|
2254
|
+
"data.scenarioShow": {
|
|
2255
|
+
name?: string;
|
|
2256
|
+
};
|
|
2257
|
+
/** Delete Scenario. Deletes a scenario by name. Params: {name}. Reads the part. Changes the document. */
|
|
2258
|
+
"data.scenarioDelete": {
|
|
2259
|
+
name?: string;
|
|
2260
|
+
};
|
|
2261
|
+
/** Scenario Summary. Inserts a Scenario Summary sheet comparing each scenario's changing cells and the given result cells. Params: {resultCells?: "B10" or "B10:B12,D4"} inserts a "Scenario Summary" sheet: changing cells and result cells for the current values and each scenario. Reads the part. Changes the document. */
|
|
2262
|
+
"data.scenarioSummary": {
|
|
2263
|
+
resultCells?: string;
|
|
2264
|
+
};
|
|
2265
|
+
/** Data Table. Fills a one- or two-variable data table: formulas evaluated for each input value down a column or across a row. Params: {range: "D2:E10", rowInput?: "B1", columnInput?: "B2"} one-variable (values down the first column with columnInput, or across the top row with rowInput; formulas in the other edge) or two-variable (formula in the top-left corner). Computes every result by substitution and writes static values (a snapshot, not a live {=TABLE()}); ?100,000 cells. Acts on `range`. Reads the part. Changes the document. */
|
|
2266
|
+
"data.dataTable": {
|
|
2267
|
+
columnInput?: string; /** like D2:E10 */
|
|
2268
|
+
range?: string; /** like B1 */
|
|
2269
|
+
rowInput?: string;
|
|
2270
|
+
};
|
|
2271
|
+
/** Advanced. Filters a list in place, or copies matching rows elsewhere, using a criteria range of headers and conditions. Params: {range? (list with headers; default current region), criteria: "H1:I3" (header row of field names; rows OR'ed, columns AND'ed; ">100", "=abc", "a*", "<>"; blank-headed formula cells are computed criteria for the first data row), copyTo?: "K1" (else filter in place by hiding rows), unique?: bool}. Acts on `range`. Reads the selection, part. Changes the document. */
|
|
2272
|
+
"data.advancedFilter": {
|
|
2273
|
+
copyTo?: string; /** like H1:I3; header row of field names; rows OR'ed, columns AND'ed; ">100", "=abc", "a*", "<>"; blank-headed formula cells are computed criteria for the first data row */
|
|
2274
|
+
criteria?: string; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
2275
|
+
range?: string;
|
|
2276
|
+
unique?: boolean;
|
|
2277
|
+
};
|
|
2278
|
+
/** Consolidate. Combines several source ranges into one at a destination with a function (sum, average, count...), matching by top row and left column labels when asked. Params: {sources: ["Sheet2!A1:C10", ..], destination?: "A1" (default active cell), function?: sum|count|countNums|average|max|min|product, topRow?: bool, leftColumn?: bool (consolidate by labels; else by position)}. Reads the selection, part. Changes the document. */
|
|
2279
|
+
"data.consolidate": {
|
|
2280
|
+
destination?: string;
|
|
2281
|
+
function?: string; /** consolidate by labels; else by position */
|
|
2282
|
+
leftColumn?: boolean; /** ["Sheet2!A1:C10", ..] */
|
|
2283
|
+
sources?: Array<Json>;
|
|
2284
|
+
topRow?: boolean;
|
|
2285
|
+
};
|
|
2286
|
+
/** Export as PDF. Renders the active sheet, all sheets, or a range to PDF and writes it to a path or answers it as base64, with the page count. Params: {path?, sheets?: active|all, range?: "A1:F40" (active sheet), fitToPage?: bool} ? {pages, bytes, path} or {pages, bytes, base64} when no path. Honours each sheet's Page Setup. Acts on `range`. Reads the part. */
|
|
2287
|
+
"file.exportPdf": {
|
|
2288
|
+
fitToPage?: boolean;
|
|
2289
|
+
path?: Json; /** like A1:F40; active sheet */
|
|
2290
|
+
range?: string;
|
|
2291
|
+
sheets?: "active" | "all";
|
|
2292
|
+
};
|
|
2293
|
+
/** Print. Renders what would print (the active sheet, all sheets, or a range) as PDF and answers it as base64 with the page count. Params: {path?, sheets?: active|all, range?, fitToPage?: bool} ? {pages, bytes, base64} ? the PDF the UI hands to the system print dialog. Acts on `range`. Reads the part. */
|
|
2294
|
+
"file.print": {
|
|
2295
|
+
fitToPage?: boolean;
|
|
2296
|
+
path?: Json; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
2297
|
+
range?: string;
|
|
2298
|
+
sheets?: "active" | "all";
|
|
2299
|
+
};
|
|
2300
|
+
/** Print Preview. Answers the printed pages (sheet, range, rows, columns, scale, paper) and, for one page, its picture, without printing. Params: {page? (1-based), sheets?: active|all, range?, fitToPage?} ? {pages, pageList: [{page, sheet, range, rows, columns, scale, paper, orientation, width, height}]}. Acts on `range`. Reads the part. */
|
|
2301
|
+
"file.printPreview": {
|
|
2302
|
+
fitToPage?: boolean; /** 1-based */
|
|
2303
|
+
page?: number; /** cells in A1 notation such as B2 or B2:D10, optionally with a sheet (Sheet2!A1); default: the selection */
|
|
2304
|
+
range?: string;
|
|
2305
|
+
sheets?: "active" | "all";
|
|
2306
|
+
};
|
|
2307
|
+
/** Page Setup. Sets a sheet's page setup in one call: orientation, paper size, margins, scaling and print options. Params: {sheet?, orientation?: portrait|landscape, paper?: Letter|Legal|A4|A3|A5|Tabloid|Executive|Ledger|B5, margins?: {left,right,top,bottom,header,footer} (inches; also accepted as top-level keys), scale?: 10..400, fitWidth?, fitHeight? (pages; 0 = automatic), fitToPage?: bool, centerH?, centerV?, gridlines?, headings?, header?: "&L&A&RPage &P of &N", footer?, printArea?: "A1:F50" ("" clears), titleRows?: "1:2", titleCols?: "A:A", rowBreaks?: [46, 91], colBreaks?: ["K"]} ? the sheet's print settings. Acts on `range`. Reads the part. Changes the document. */
|
|
2308
|
+
"pageLayout.pageSetup": {
|
|
2309
|
+
bottom?: number; /** read by the command beside its listed parameters */
|
|
2310
|
+
cell?: string;
|
|
2311
|
+
centerH?: boolean;
|
|
2312
|
+
centerV?: boolean;
|
|
2313
|
+
colBreaks?: Array<string>;
|
|
2314
|
+
fitHeight?: number;
|
|
2315
|
+
fitToPage?: boolean;
|
|
2316
|
+
fitWidth?: number;
|
|
2317
|
+
footer?: string;
|
|
2318
|
+
gridlines?: boolean; /** like &L&A&RPage &P of &N */
|
|
2319
|
+
header?: string;
|
|
2320
|
+
headings?: boolean; /** read by the command beside its listed parameters */
|
|
2321
|
+
left?: number; /** {left,right,top,bottom,header,footer} (inches; also accepted as top-level keys); inches; also accepted as top-level keys */
|
|
2322
|
+
margins?: {
|
|
2323
|
+
bottom?: number;
|
|
2324
|
+
footer?: Json;
|
|
2325
|
+
header?: Json;
|
|
2326
|
+
left?: number;
|
|
2327
|
+
right?: number;
|
|
2328
|
+
top?: number;
|
|
2329
|
+
};
|
|
2330
|
+
orientation?: "portrait" | "landscape";
|
|
2331
|
+
paper?: "Letter" | "Legal" | "A4" | "A3" | "A5" | "Tabloid" | "Executive" | "Ledger" | "B5"; /** like A1:F50; "" clears */
|
|
2332
|
+
printArea?: string; /** read by the command beside its listed parameters */
|
|
2333
|
+
range?: string; /** read by the command beside its listed parameters */
|
|
2334
|
+
right?: number; /** [46, 91] */
|
|
2335
|
+
rowBreaks?: Array<number>; /** 10 to 400 */
|
|
2336
|
+
scale?: number;
|
|
2337
|
+
sheet?: Json; /** like A:A */
|
|
2338
|
+
titleCols?: string; /** like 1:2 */
|
|
2339
|
+
titleRows?: string; /** read by the command beside its listed parameters */
|
|
2340
|
+
top?: number;
|
|
2341
|
+
};
|
|
2342
|
+
/** Render Sheet Range. Answers a picture of one sheet's range with its row and column headings, the agent's preview: `target.sheet` (a name or `sheet:<id>`; default the first sheet, never the active one) and `target.range` (A1; default the used range, cut to 5000 cells and said so in `capped`), `scale` pixels per point (default 1, at most 4) brought down to `maxSize`. Changes nothing; the same call answers the same bytes. Params: {target?: {sheet?: string, range?: string}, scale?: number, maxSize?: number}. */
|
|
2343
|
+
"file.render": {
|
|
2344
|
+
maxSize?: number; /** pixels per point, more than 0 and at most 4 (default 1) */
|
|
2345
|
+
scale?: number; /** the view to draw: `sheet` and `range` */
|
|
2346
|
+
target?: {
|
|
2347
|
+
range?: string;
|
|
2348
|
+
sheet?: string;
|
|
2349
|
+
};
|
|
2350
|
+
};
|
|
2351
|
+
/** Enter in Active Cell. Enters text into the active cell as if typed there and confirmed with Enter. Params: {text: string}. Reads the selection, part, mode. Changes the document. */
|
|
2352
|
+
"commandLine": {
|
|
2353
|
+
text?: string;
|
|
2354
|
+
};
|
|
2355
|
+
/** Set Visible Grid Extent. Extends the visible grid to the viewport's right and bottom edges in document pixels without editing or saving the workbook. Params: {right: number, bottom: number, x?: number, y?: number}. */
|
|
2356
|
+
"editor.viewport": {
|
|
2357
|
+
bottom?: number;
|
|
2358
|
+
right?: number;
|
|
2359
|
+
x?: number;
|
|
2360
|
+
y?: number;
|
|
2361
|
+
};
|
|
2362
|
+
/** Set the Editor's Wording. Sets the generic name tables give columns with empty headers, numbered (Column1; ?1 in a Chinese editor), without editing or saving the workbook; answers it. Params: {columnPrefix?: string}. */
|
|
2363
|
+
"editor.wording": {
|
|
2364
|
+
columnPrefix?: string;
|
|
2365
|
+
};
|
|
2366
|
+
/** Draw the Grid in the Host's Color Scheme. Draws the editor's grid in the host's color scheme (`scheme`: light or dark): empty cells, gridlines, headings and automatic text and borders follow it, colours the workbook sets stay as they are, and nothing moves. Neither edits nor saves the workbook; pictures and exports are always light. Answers whether it changed. Params: {scheme: string}. */
|
|
2367
|
+
"editor.scheme": {
|
|
2368
|
+
scheme?: string;
|
|
2369
|
+
};
|
|
2370
|
+
/** Type in the Formula Bar. Types in the formula bar: the text becomes the active cell's typing (started from what the cell holds), so the cell shows it and pointing at cells inserts their references at the caret. With enter, enters it as Enter (down), Shift+Enter (up), Tab (right), Shift+Tab (left) or the check button (stay) do. With peek, changes nothing. With no params, drops the typing as Escape does. Answers the typing, its selection, its references and the function list and argument hint at the caret. Offsets are UTF-16. Params: {text?: string, start?: number, end?: number, enter?: string, peek?: boolean}. Reads the selection, part. */
|
|
2371
|
+
"editor.formula": {
|
|
2372
|
+
end?: number; /** Enters the typing and moves the active cell */
|
|
2373
|
+
enter?: "down" | "up" | "right" | "left" | "stay"; /** true answers the typing without changing anything */
|
|
2374
|
+
peek?: boolean; /** Start of the selection (UTF-16 offset); default the end of the text */
|
|
2375
|
+
start?: number; /** The formula bar's text */
|
|
2376
|
+
text?: string;
|
|
2377
|
+
};
|
|
2378
|
+
/** Cycle Reference Type (F4). F4 for a formula being typed: the reference at the caret cycles A1, $A$1, A$1, $A1. With text (start..end, UTF-16 offsets), for a formula typed outside the grid (the formula bar); without, in the cell being typed. Answers the new text and caret; changes no cell. Params: {text?: string, start?: number, end?: number}. Reads the selection. */
|
|
2379
|
+
"editor.cycleReference": {
|
|
2380
|
+
end?: number;
|
|
2381
|
+
start?: number;
|
|
2382
|
+
text?: string;
|
|
2383
|
+
};
|
|
2384
|
+
/** Insert Function From List. Puts the named function and its opening parenthesis in place of the function name being typed in the cell editor (a choice in the function list). Answers whether a cell is being typed and its text. Params: {name?: string}. Reads the selection. */
|
|
2385
|
+
"editor.acceptFunction": {
|
|
2386
|
+
name?: string;
|
|
2387
|
+
};
|
|
2388
|
+
/** Right-Click the Grid. A right-click on the grid at document point (x, y), as the editor's right-click menus do: enters what is being typed, then selects the cell, row or column heading pressed (unless it is already selected) or the whole sheet (the corner). Answers which menu shows: cell, rows, cols, all, or null (an outline button). Params: {x: number, y: number}. Reads the selection, part. */
|
|
2389
|
+
"editor.contextMenu": {
|
|
2390
|
+
x?: number;
|
|
2391
|
+
y?: number;
|
|
2392
|
+
};
|
|
2393
|
+
/** Insert Text at the Caret. Types text at the caret of what is being typed (the cell, or a shape's text); with nothing typed, after the selected shape's text, else in the active cell: after what it holds with the cell left open (append, as WPS inserts a symbol), or in its place. A checkbox cell refuses it. Answers where the text went. Params: {text: string, append?: boolean}. Reads the selection, part. */
|
|
2394
|
+
"editor.insertText": {
|
|
2395
|
+
append?: boolean; /** the text, 1 to 256 characters without control characters */
|
|
2396
|
+
text?: string;
|
|
2397
|
+
};
|
|
2398
|
+
/** Preview a Freeze. Shows (or with no rows and cols, takes away) the preview of a freeze the editor's Freeze Panes menu points at: the rows and columns that would freeze, tinted, and the line under and right of them. Changes nothing. Params: {rows?: number, cols?: number}. Reads the part. */
|
|
2399
|
+
"editor.freezePreview": {
|
|
2400
|
+
cols?: number; /** rows that would freeze */
|
|
2401
|
+
rows?: number;
|
|
2402
|
+
};
|
|
2403
|
+
/** Answer a Data Validation Message. The person's answer to the editor's data validation message for what they typed: retry keeps the cell open with its text selected, cancel drops what was typed, accept (a Warning or an Information rule only) enters it and moves on as Enter would have. Answers whether the cell is still being typed. Params: {answer: string}. Reads the selection, part. */
|
|
2404
|
+
"editor.validation": {
|
|
2405
|
+
answer?: "retry" | "accept" | "cancel";
|
|
2406
|
+
};
|
|
2407
|
+
/** Comment Anchor of Selection. Answers the comment anchor of the selected range on the active sheet (Kit UI protocol comment.create): ids naming its sheet, rows and columns by object, so it follows inserted and deleted rows and columns and sheet renames, and a label. Changes nothing. Params: {}. Reads the selection, part. */
|
|
2408
|
+
"editor.commentAnchor": Record<string, never>;
|
|
2409
|
+
/** Find Comment Anchors. Finds comment anchors that editor.commentAnchor answered: for each, whether it is still in the workbook, its sheet and range now, and on the active sheet its rectangle in document pixels. Changes nothing. Params: {anchors: array}. Reads the part. */
|
|
2410
|
+
"editor.commentPlaces": {
|
|
2411
|
+
anchors?: Array<{
|
|
2412
|
+
ids?: Array<string>;
|
|
2413
|
+
}>;
|
|
2414
|
+
};
|
|
2415
|
+
}
|
|
2416
|
+
/** A Sheet file opened with `openDocument<Workbook, SheetCommands>`. */
|
|
2417
|
+
export type SheetDocument = ModelDocument<Workbook, SheetCommands>;
|
|
2418
|
+
export type SheetContext = RequestContext<Workbook, SheetCommands>;
|
|
2419
|
+
export {};
|