workbook_fill
Pass two of a workbook import, done for you: every input, constant and mixed row of the model whose source cites a workbook row (the string workbook_structure hands you), or that map names, takes that row's cached values — an input its values period by period, aligned by the sheet's column labels; a constant its one number; a calculated or mixed row the cells the sheet types in columns the header marks actual, as actuals. Scaled by scale where the sheet states a magnitude (1000 for a sheet in thousands, or whose unit says kUSD; percent-formatted rows are never scaled). Every cited node, calculated ones too, takes the sheet's row label as its title where it has none, the sheet's unit where it declares none and the sheet's number format (decimals, percent or currency, the scale) where it carries none; a unit the node declares that differs from the sheet's is reported. Reports what it wrote, what it could not (a column not on the model's axis, a row with no cached figures, a typed cell past actualsThrough) and the workbook rows nothing in the model cites yet. Run it after pass one has declared the inputs, and again after adding sections; never retype cached values with set_values when this can copy them.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>"
},
"name": "workbook_fill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | No | Node → workbook row, for nodes whose source does not cite one: `{"income.revenue": "Model!Revenue"}`, `"Model!row 5"`, or a citation string; or `{row, scale}` when one row has its own magnitude. | |
| model | Yes | Model uid (`model_…`), from model_list. | |
| names | No | Fill only these nodes. Default: every node that cites a row. | |
| scale | No | What a workbook figure is multiplied by to reach the model's base unit: a number for the whole workbook, or `{"Model": 1000, "Assumptions": 1}` by sheet, for a sheet whose magnitude is written in its corner. Where you pass none for a sheet, each row's own unit text decides — a `uom` of `kUSD` is 1000, `t` or `USD/oz` is 1 — so a sheet that writes the unit beside every row wants no scale at all. Percent-formatted rows are never scaled. | |
| scenario | No | The scenario to fill. Default: the one on screen. | |
| attachment | No | The attachment id from attachment_list. May be omitted when one workbook is attached. |