Skip to content

API reference / Common / Engine types / SpreadsheetCommand

Type Alias: SpreadsheetCommand ​

ts
type SpreadsheetCommand = 
  | {
  resizeColumns: {
     sheet: SheetId;
     first: number;
     last: number;
     width: GridColumnWidth | null;
  };
}
  | {
  resizeRows: {
     sheet: SheetId;
     first: number;
     last: number;
     height: GridRowHeight | null;
  };
};

An edit intent for a spreadsheet document. The editor turns a command into a CRDT modification; it never touches the model directly.

A resize is a multi-track intent: the command carries an inclusive track range and fans out, at decode, into one absolute per-track SpreadsheetOperation — the command-does-many / operation-does-one split (like portable's command over its Set* operations).