Set calc settings
set_calc_settingsTurn iterative calculation on or off for an Excel session and recalculate so circular models converge; exported workbooks keep the same settings.
Instructions
Turn iterative calculation on or off for a session and recalculate. Needed for circular models (e.g. development pro formas where loan size depends on cost, which includes the loan's interest and fees): with it on, set_inputs re-converges the loop on every call. Saved with the session's next commit (restore_session to an earlier commit rolls it back) and written to the workbook, so an exported xlsx iterates in Excel too. Returns {calc, recalc}: the settings now in force and whether the model converged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iterative | Yes | Enable iterative calculation (Excel: Enable iterative calculation) | |
| max_change | No | Converged once no value moves more than this (Excel default 0.001) | |
| session_id | Yes | Session ID returned by create_session (list_sessions shows the open ones) | |
| max_iterations | No | Maximum passes (Excel default 100) |