WorkbookAPI
v0.2.1Check Excel workbooks locally; calculate them through the WorkbookAPI hosted API.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_workbook
Use before trusting a workbook's calculations to compare recalculated formulas with Excel's saved values. Returns compared/matching totals, up to 200 mismatches with formula, saved/recalculated values and cause, feature flags, skipped counts, engine (the first 8 lowercase hex characters of the loaded binary's SHA-256), the workbook's dateSystem ("1900" or "1904"), and load/recalculation milliseconds. Dates are serial numbers in the workbook's date system. Above the 20000-byte response budget, mismatch details are shortened with an explicit message and totals retained. Only eligible cached form…
| Parameter | Type | Description |
|---|---|---|
path * | string | Local workbook path (absolute recommended), at most 50 MiB; .xlsx, .xlsm, .xltx or .xltm. |
describe_workbook
Use to discover sheets, used ranges, defined names and the workbook's dateSystem ("1900" or "1904") before choosing inputs and outputs. Dates are serial numbers in the workbook's date system. Names include values up to 100 cells, or range address and dimensions for larger blocks (expression arrays have a null address). Pass sheet for referenced constant or blank inputs and terminal formula outputs. Lists are capped at 100 entries. Above the 20000-byte response budget including both copies, named values are omitted with valuesOmitted: true; discovery lists may be shortened with an explicit mess…
| Parameter | Type | Description |
|---|---|---|
path * | string | Local workbook path (absolute recommended), at most 50 MiB; .xlsx, .xlsm, .xltx or .xltm. |
sheet | string | Sheet name for input/output candidate discovery. |
upload_model
Upload a local workbook to the WorkbookAPI hosted API as a new model, or a new version when model_id is given. Sends the whole workbook file and its file name. Returns the API model id, version id and compatibility report. Uses a model slot for a new model and counts against daily uploads; bills no calculation scenarios. Requires an admin key. Files must be at most 10 MiB.
| Parameter | Type | Description |
|---|---|---|
path * | string | Local workbook path; at most 10 MiB; .xlsx, .xlsm, .xltx or .xltm. |
model_id | string | Hosted model id returned by upload_model. |
get_model
Read a model from the WorkbookAPI hosted API. Sends the model id; returns the API model metadata, active version and declared interface. Requires an admin key. Bills no calculation scenarios.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Hosted model id returned by upload_model. |
set_interface
Declare inputs and outputs on the WorkbookAPI hosted API. Sends the model id and the input/output arrays given, including their names, workbook references, types and constraints. Replaces the whole interface and returns the API interface result. The API validates the declarations. Requires an admin key. Bills no calculation scenarios.
| Parameter | Type | Description |
|---|---|---|
inputs * | array | Input declarations, each {name, ref, type} with type number, string or boolean, and optionally min and max (numbers) or allowed (a list of permitted values); ref is one constant or blank cell, or a na… |
model_id * | string | Hosted model id returned by upload_model. |
outputs * | array | Output declarations, each {name, ref}; ref is the workbook cell, range or name to return. |
calculate
Calculate one scenario through the WorkbookAPI hosted API. Sends the model id and the input values, output names and as_of value given. Inputs and outputs use declared interface names. Returns the API outputs, warnings, request_id and billed_scenarios unchanged. Bills 1 scenario on success. Dates are serial numbers in the workbook's date system. A lost response may still be billed; this server never retries automatically.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Hosted model id returned by upload_model. |
as_of | string | Calculation moment: YYYY-MM-DD or RFC 3339 date-time with offset; omitted uses today. |
inputs | object | Declared input names mapped to scalar values; omitted inputs keep their saved values. |
outputs | array | Declared output names; omitted selects all declared outputs. |
run_scenarios
Compare scenarios through the WorkbookAPI hosted API. Sends the model id and the scenarios, output names and as_of value given. Bills each returned API row that has outputs. Probes one scenario, then sends at most one more batch sized for the response budget. Returns indexed rows, request_ids, billing totals and resume advice. Unsent rows are not billed; any rows dropped after calculation are reported and were billed if they had outputs. A lost response may still be billed. Never retries automatically.
| Parameter | Type | Description |
|---|---|---|
model_id * | string | Hosted model id returned by upload_model. |
scenarios * | array | 1 to 10,000 scenarios, each with its own inputs; rows come back in the same order. |
as_of | string | Calculation moment: YYYY-MM-DD or RFC 3339 date-time with offset; omitted uses today. |
outputs | array | Declared output names; omitted selects all declared outputs. |