Skip to content

Docs / All tools / Loop III: Assistant

doc.render_xlsx

Generate an Excel spreadsheet.

25 credits. Per document.

Example prompt

Send this to your AI app when Heelo is connected:

Export these line items to an Excel file

Input fields

FieldTypeDescription
sheetsRequiredarray of objectWorksheets in order: {"name":"...","rows":[[...]]}, optionally header, freeze_header and column_widths.
allow_formulasbooleanWrite strings starting with "=" as real formulas. Off by default.
return_databooleanAlso return the file as base64 in `data`.
end_user_idstringWhich of your end users the render is stored for; doc.extract_* must pass the same one to read it.

Output fields

The fields in data when status is success.

FieldTypeDescription
asset_idstringReadable by doc.extract_* as source.asset_id for 30 days. Null when not stored.
bytesintegerSize of the rendered document.
pagesintegerPage count for a PDF. Null for DOCX/XLSX, which have no layout.
content_typestring
filenamestring
engine_usedstring
engine_reasonstringWhy that engine was chosen (PDF only).
render_msinteger
storedbooleanFalse when the document could not be stored for this caller; see `data`.
datastringThe document as base64, when not stored or when asked for.
warningsarray of string
limitationsarray of string

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/doc.render_xlsx/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "sheets": [{"name": "Invoices", "rows": [["Invoice", "Total"], ["1001", 120.5]]}],
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())