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
| Field | Type | Description |
|---|---|---|
sheetsRequired | array of object | Worksheets in order: {"name":"...","rows":[[...]]}, optionally header, freeze_header and column_widths. |
allow_formulas | boolean | Write strings starting with "=" as real formulas. Off by default. |
return_data | boolean | Also return the file as base64 in `data`. |
end_user_id | string | Which 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.
| Field | Type | Description |
|---|---|---|
asset_id | string | Readable by doc.extract_* as source.asset_id for 30 days. Null when not stored. |
bytes | integer | Size of the rendered document. |
pages | integer | Page count for a PDF. Null for DOCX/XLSX, which have no layout. |
content_type | string | |
filename | string | |
engine_used | string | |
engine_reason | string | Why that engine was chosen (PDF only). |
render_ms | integer | |
stored | boolean | False when the document could not be stored for this caller; see `data`. |
data | string | The document as base64, when not stored or when asked for. |
warnings | array of string | |
limitations | array 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())// Node.js 18 or newer, in an ES module.
const response = await fetch("https://toolsprimitives.uk/v1/tools/doc.render_xlsx/invoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HEELO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: {
"sheets": [
{
"name": "Invoices",
"rows": [
[
"Invoice",
"Total"
],
[
"1001",
120.5
]
]
}
]
},
}),
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());