Dokaz API › Docs › CSV ⇄ JSON ⇄ Excel
JSON to Excel (XLSX) API
Customers ask for "the Excel file", and a CSV is not quite it: Excel re-guesses every column, drops the leading zero from ZIP codes and turns part numbers into dates. This endpoint writes an actual workbook, with each cell typed from your JSON - numbers stay numbers, true and false are booleans, and text stays exactly the text you sent.
The header row is bold and frozen so it stays in view while scrolling, columns are sized to their content, and {"sheets": [...]} puts several lists in one file as separate tabs. Text is never a formula: a value starting with "=" arrives as text, so an export cannot carry a spreadsheet formula injection.
Request
curl -X POST https://api.dokaz.net/v1/convert/json-to-xlsx \
-H "content-type: application/json" \
-d '{"sheet_name":"Orders","rows":[{"order":"A-1001","customer":"Hopper, Grace","zip":"02134","total":129.5,"paid":true},{"order":"A-1002","customer":"Ada","zip":"98101","total":42,"paid":false}]}'
curl -X POST https://api.dokaz.net/v1/convert/json-to-xlsx \
-H "content-type: application/json" --data-binary @rows.json -o export.xlsx
curl -X POST https://api.dokaz.net/v1/convert/json-to-xlsx \
-H "content-type: application/json" \
-d '{"sheets":[{"name":"Paid","rows":[{"id":1}]},{"name":"Unpaid","rows":[{"id":2}]}]}' -o report.xlsx
The response is the .xlsx file (Content-Disposition: attachment). x-xlsx-rows and x-xlsx-sheets describe it. The body limit is 1 MB of JSON.
Pricing
100 calls a day are free with no key. Need more? Starter is $9/month for 10,000 calls across every product, key issued instantly.
Questions
Does it guess dates and numbers from text?
No. A JSON number becomes a number cell and a JSON string becomes a text cell, exactly as sent. That is what keeps "02134" and "1-2" intact. Send numbers as numbers when you want to sum them.
Which programs open the file?
Any spreadsheet program that reads Office Open XML. Every build is checked by opening the output in openpyxl, and the format was checked by opening it in Microsoft Excel.
What is refused?
Things Excel cannot hold, rather than silently changing them: text longer than 32,767 characters in one cell, more than 16,384 columns, and sheet names Excel rejects. The 400 says which value.