Export workbook
export_workbookSave a session's workbook as an .xlsx file with recalculated formula values and a summary of formula errors, so you can hand off or read it outside Excel.
Instructions
Get a session's workbook back as an .xlsx file with every formula's computed value saved in it. Recalculates first. Call this when you need the file itself: to give it to the user, or to read it with pandas, openpyxl (data_only=True) or any tool that is not Excel. Returns the file and a summary of formula errors (#REF!, #DIV/0!, #NAME? with sheet and cell) and of anything that did not survive the save. Everything Basis does not model (styles, charts, images, data validation, defined names, comments, VBA) is carried over from the original file unchanged. Pass output_path to save the file on this machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overwrite | No | Allow output_path to replace an existing file (default false: an existing file is an error) | |
| session_id | Yes | Session ID returned by create_session (list_sessions shows the open ones) | |
| output_path | No | Write the .xlsx to this local path instead of returning it as base64 (recommended: a workbook as base64 is very large). The result then carries saved_to rather than file_base64. |