Quick start: your first project
Prepare a folder, add a workbook and a script, run the example, and see the result.
Prepare your first project
Section titled “Prepare your first project”You’ll need Node.js version 22 LTS or newer and any XLSX workbook. The ready-made kit on the desktop already has input.xlsx and the verified f1-api-first-run.mjs.
Create a folder
Section titled “Create a folder”mkdir -p ~/Desktop/SumSheet-API-First-Runcd ~/Desktop/SumSheet-API-First-Runmkdir $HOME\Desktop\SumSheet-API-First-Run -Forcecd $HOME\Desktop\SumSheet-API-First-Runmkdir -p ~/Desktop/SumSheet-API-First-Runcd ~/Desktop/SumSheet-API-First-RunAdd the source workbook
Section titled “Add the source workbook”Copy an existing workbook and name it input.xlsx. The script doesn’t change the source file: it writes a new result.xlsx.
cp ~/Downloads/workbook.xlsx ./input.xlsxls -lh input.xlsxCopy-Item $HOME\Downloads\workbook.xlsx .\input.xlsxGet-Item .\input.xlsx | Format-List Name, Lengthcp ~/Downloads/workbook.xlsx ./input.xlsxls -lh input.xlsxAdd the script
Section titled “Add the script”Use the f1-api-first-run.mjs file from the Evaluation Kit. The full text is on the Verified script page.
Run the example
Section titled “Run the example”cd ~/Desktop/SumSheet-API-First-Runnode ./f1-api-first-run.mjscd $HOME\Desktop\SumSheet-API-First-Runnode .\f1-api-first-run.mjscd ~/Desktop/SumSheet-API-First-Runnode ./f1-api-first-run.mjsThe script performs seven steps:
-
starts compute_contract_cli –session and gets the handshake;
-
opens input.xlsx through open_workbook_subset;
-
gets subsetId and sheetKey from Rust’s response;
-
writes A1 = SumSheet API, B1 = 21, C1 = the formula =B1*2;
-
reads C1 and gets displayValue 42;
-
performs Undo and Redo through the central history;
-
saves result.xlsx, starts a new process, and checks C1 after a cold open.
Expected output
Section titled “Expected output”1. Session: compute_contract_cli_session_ready2. Workbook opened: Data subset-...3. Changes applied, revision: 14. C1 after the formula: ... displayValue: '42' ...5. Undo/Redo: done6. Saved: .../result.xlsx7. Reopened, C1: ... displayValue: '42' ...See the result
Section titled “See the result”open -a ~/Applications/SumSheet.app ~/Desktop/SumSheet-API-First-Run/result.xlsx& "C:\Program Files\SumSheet\SumSheet.exe" "$HOME\Desktop\SumSheet-API-First-Run\result.xlsx"/opt/SumSheet/f1 ~/Desktop/SumSheet-API-First-Run/result.xlsxWhat’s next
Section titled “What’s next”- Understand how the session lives and what arrives in the response — How the API session works.
- Work through every call in the example — Requests used in the example.
- Get the whole script — Verified script.
- Every operation with its fields — the Compute Contract reference.
- Something won’t start — Diagnostics.