Excel to JSON by API: dates, sheets and formulas
Convert XLSX files to JSON rows with one API call. How Excel dates become ISO 8601, how to read one sheet or all, what happens to formulas, and the size limits.
Users upload spreadsheets; your app wants JSON. The CSV and Excel to JSON API reads .xlsx files as well as CSV, with a few rules that matter for Excel.
curl https://api.justapi.tech/v1/data/to-json \
-H "Authorization: Bearer ak_live_..." \
-H "Content-Type: application/json" \
-d '{"source": {"url": "https://files.example.com/sales-2026.xlsx"}, "options": {"all_sheets": true}}'
Types come from Excel
Unlike CSV, an Excel cell has a type. The API keeps it:
- Numbers stay numbers, and text stays text, including text that looks like a number, such as a ZIP code typed as text.
- Booleans stay booleans.
- Empty cells become
null.
Dates
Excel stores dates as numbers (days since 1900) with a date format. The API reads the format and returns an ISO 8601 string, like "2026-11-05", or "2026-11-05T14:30:00" when the cell has a time. Your code gets a value it can parse, not 46331.
Formulas
The API reads the value Excel saved for each formula the last time the file was saved. It does not recalculate. Files saved by Excel, Google Sheets and LibreOffice all store these values. A file generated by a script that wrote formulas without values will show null for those cells; open and save it once in Excel, or compute the values in the script.
Sheets
By default, the first sheet is read. Pick another with sheet: "Q3", or read every sheet with all_sheets: true. The output always has a sheets list, one entry per sheet, each with its own columns, row_count and rows:
{ "format": "xlsx", "sheets": [
{ "name": "Jan", "columns": ["date", "amount"], "row_count": 31, "rows": [ { "date": "2026-01-01", "amount": 120.5 } ] },
{ "name": "Feb", "columns": ["date", "amount"], "row_count": 28, "rows": [] }
] }
Limits
Up to 2 million cells. Only .xlsx is read; old .xls files must be saved as .xlsx first. Password-protected workbooks cannot be read. A file the converter cannot open fails with unsupported_media_type, at no charge.
The other direction
To turn JSON back into a styled spreadsheet, use the JSON to Excel API.
Cost
$0.004 per file at the first tier. Try a workbook in the free Excel to JSON tool.