jsonToSheet
On this page
Create a new worksheet from an array of JSON objects.
This is a convenience wrapper around addJsonToSheet that always creates
a fresh worksheet.
jsonToSheet(js: any[], opts?: JSON2SheetOpts): WorkSheet
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
js | any[] | Yes | Array of plain objects whose keys map to column headers |
opts | JSON2SheetOpts | No | Optional settings (same as addJsonToSheet) |
Returns
A new worksheet populated with the given data