Convert a Worksheet to an array of JSON objects.
By default, the first row (at or after the start of range) is the header row. Pass header: 'A' to use column letters as keys.
range
header: 'A'
The Worksheet to convert.
Optional
Options for header mode, range, default value, and row limit.
An array of objects where keys are header names and values are cell values.
const data = sheetToJson(ws);console.log(data[0]); // { Name: 'Alice', Score: 95 } Copy
const data = sheetToJson(ws);console.log(data[0]); // { Name: 'Alice', Score: 95 }
Convert a Worksheet to an array of JSON objects.
By default, the first row (at or after the start of
range) is the header row. Passheader: 'A'to use column letters as keys.