All examples
advanced
Convert a URL response
Fetch a remote spreadsheet and parse it.
Pipe a fetch response through TabularJS without saving to disk — ideal for serverless functions and edge workers.
js
import tabularjs from 'tabularjs';
const response = await fetch('https://example.com/report.xlsx');
const buffer = await response.arrayBuffer();
const result = await tabularjs(buffer, { name: 'report.xlsx' });
console.log(result.worksheets[0].data.slice(0, 5));Live Preview
Sample output for a file with employee data.
stdout
{
"worksheets": [
{
"name": "Sheet1",
"data": [
["Name", "Department", "Salary", "Start Date"],
["Alice Johnson", "Engineering", 95000, "2021-03-15"],
["Bob Smith", "Marketing", 72000, "2022-01-10"],
["Carol Williams", "Engineering", 88000, "2020-07-22"],
["David Brown", "Design", 68000, "2023-02-08"],
["Eve Davis", "Engineering", 102000, "2019-11-30"]
]
}
]
}
