XLSX build API: an Excel workbook from JSON, pay per call
Updated 2026-10-10
Use when an agent must produce an Excel workbook (.xlsx) from JSON data: typed columns, styled header, several sheets.
POST https://tanod.dev/v1/docs/xlsx-build builds an Excel workbook from JSON and returns it as base64. Send sheets (1 to 20), each with a name, optional typed columns and rows, and optionally a filename. It costs USD 0.005 per call, paid in USDC through x402, with no account and no API key. There is no free daily allowance on this route. The same function is the build_xlsx_workbook tool in the documents MCP server at https://tanod.dev/mcp/docs.
Request fields
sheets(required): each hasname(1 to 31 characters, none of[ ] : * ? / \, unique ignoring case, not "History"),rows(required), optionalcolumns, andfreeze_headerandautofilter(both on by default).columns: each hasheader, an optionaltype(string,number,integer,date,datetime,boolean,currencyorpercent), awidthin characters (default: fitted to the content) and a custom Excel numberformat. A value that does not fit its type is a 422.rows: arrays (values by position) or objects (values by header). Withoutcolumns, object rows give the headers from their keys in first-seen order, and array rows get no header row. A value is a string, number, boolean or null (an empty cell).filename: the name of the returned file (defaultworkbook.xlsx;.xlsxis added when missing).
Dates are ISO 8601 (a datetime with a zone is converted to UTC). A percent is a fraction: 0.25 shows as 25%. The header row is bold, frozen and has filter buttons, and columns are fitted to their content.
Example
curl -s -X POST https://tanod.dev/v1/docs/xlsx-build \
-H "Content-Type: application/json" \
-d '{"sheets": [{"name": "Sales", "columns": [{"header": "Region"}, {"header": "Units", "type": "integer"}, {"header": "Revenue", "type": "currency"}, {"header": "Share", "type": "percent"}, {"header": "Closed", "type": "date"}], "rows": [["North", 120, 4800.5, 0.42, "2026-09-30"], ["South", 85, 3400, 0.31, "2026-10-01"]]}], "filename": "sales-q3.xlsx"}'
Without payment the answer is 402 Payment Required with the price in USDC; an x402 client signs and repeats the call. The reply carries the workbook as base64 in file, plus sheets, rows and cells counts, formula_like_strings, a sheet_summary per sheet (name, rows, columns, cells) and output_bytes. For the call above that is 1 sheet, 2 rows and 15 cells.
Formulas are never written
Numeric column types parse numeric strings; integers of 16 or more digits are stored as text to keep every digit. Send identifiers as strings with type string. Formula-like text such as =HYPERLINK(...) stays text. formula_like_strings counts the strings that looked like formulas. If you need real formulas, add them in Excel afterwards.
Limits
- At most 20 sheets, 50,000 cells in all (header cells included), 32,767 characters per cell and 5,000,000 characters of text in all.
- Anything over a limit, a bad sheet name, duplicate headers or a value that does not fit its column type is a 422 and is not charged.
Related
To read a workbook back into JSON, use the Excel to JSON API. To make a PDF of the result, use the Office to PDF API.
Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/docs?via=xlsx-build-api as a custom connector (steps), then ask in plain words, for example "Make an Excel workbook from these sales rows with a styled header." Eligible Claude.ai connectors use a shared daily docs allowance; ordinary MCP calls are paid. Outside that allowance, a call needs an x402 payment, which these clients can make.
Related guides: Excel to JSON API, PPTX build API, DOCX template fill API, Office to PDF API, PDF table extraction API. Updated 2026-10-10. All guides, or back to tanod.dev. Results are automated.