Excel ↔ JSON / CSV API
Read an .xlsx workbook into JSON rows or CSV (dates as ISO, header row as keys), or build a styled .xlsx file with several sheets from JSON.
The Excel API works in both directions. Upload an .xlsx file and get the first visible sheet (or the one named in sheet, by name or index) as JSON objects keyed by the header row, as raw rows (format=rows) or as CSV (format=csv, UTF-8 with BOM so Excel reopens it correctly, delimiter=; for European Excel). Date cells are recognised from their number format and returned as 2026-11-11, booleans stay booleans, empty rows are skipped and duplicate headers get a suffix (Tên_2). list=sheets only lists the sheets, skip_rows skips a title block above the header and limit caps the rows returned.
Send JSON instead of a file to create a workbook: data (an array of objects or of arrays) for one sheet, or sheets ({"Sheet name": [...]}) for up to 20 sheets. Objects produce a bold, frozen header row with an auto filter; YYYY-MM-DD strings become real Excel dates (dd/mm/yyyy). The answer is the .xlsx file itself, named after filename.
Our own reader and writer run in memory: up to 1,000,000 cells when writing, 2,000,000 cells when reading, within the file size of your plan. Old .xls files are not supported (save them as .xlsx), and formulas are read as their last computed value.
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
file | body | file | no | The .xlsx file to read (multipart, raw body or file_base64). | |
sheet | query|body | string | no | Reading: sheet name or 0-based index (default: first visible sheet). Writing with data: sheet name. | |
format | query|body | string | no | json | json (objects by header), rows (arrays) or csv. |
header | query|body | boolean | no | true | false: the first row is data, not a header. |
skip_rows | query|body | number | no | 0 | Rows to skip before the header (0–1000). |
skip_empty | query|body | boolean | no | true | false keeps empty rows. |
limit | query|body | number | no | 100000 | Maximum rows returned (JSON). |
delimiter | query|body | string | no | , | CSV delimiter: , or ;. |
list | query|body | string | no | sheets: only list the sheets. | |
data | body | array | no | Writing: array of objects or arrays for one sheet; the answer is an .xlsx file. | |
sheets | body | object | no | Writing: {"Sheet name": [rows]}, up to 20 sheets. | |
filename | body | string | no | data | Name of the generated file (without .xlsx). |
Example
curl -X POST "https://apibox.io.vn/v1/xlsx-convert" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "0=@./my-file"const form = new FormData();
form.append('0', fileInput.files[0]);
const res = await fetch('https://apibox.io.vn/v1/xlsx-convert', {
method: 'POST',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
body: form,
});
console.log(await res.json());import requests
res = requests.post(
"https://apibox.io.vn/v1/xlsx-convert",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"0": open("my-file", "rb")},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/xlsx-convert');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
CURLOPT_POSTFIELDS => ['0' => new CURLFile('my-file')],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"sheet": "Khách hàng",
"sheets": [
{
"index": 0,
"name": "Khách hàng",
"hidden": false
}
],
"rows": 2,
"columns": 4,
"headers": [
"Họ tên",
"Tuổi",
"Ngày mua",
"VIP"
],
"truncated": false,
"data": [
{
"Họ tên": "Nguyễn Văn An",
"Tuổi": 30,
"Ngày mua": "2026-11-11",
"VIP": true
},
{
"Họ tên": "Trần Thị Bình",
"Tuổi": 25,
"Ngày mua": "2026-01-02",
"VIP": false
}
]
}
Use cases
- Import customer or product lists uploaded as Excel
- Export reports from your database as .xlsx
- Turn an Excel price list into CSV for another system
- Read bank or marketplace statements sent as XLSX
FAQ
Are formulas evaluated?
No: the value Excel saved with the file is returned. Files generated without cached values return the formula cells empty.
How are dates returned?
As ISO strings (2026-11-11, or 2026-11-11T08:30:00 with a time), detected from the cell number format.
Can I read a sheet other than the first?
Yes, sheet=<name> or sheet=<index> (0-based); list=sheets shows the names, including hidden sheets.
Related APIs
Image Metadata & EXIF
Read image dimensions, format, EXIF camera data, capture settings and GPS location from JPEG, PNG, WebP, HEIC, AVIF, GIF and more – upload or URL.
PDFPDF Metadata
Read PDF metadata: page count, title, author, creator, producer, dates, PDF version, encryption, form fields and the size of each page (A4, Letter…).
PDF₫Quote & Receipt PDF
Generate clean PDF quotations, receipts, orders and simple invoices from JSON, with Vietnamese text, VAT, totals in words and a VietQR code for payment.