Skip to content

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

NameTypeRequiredDescription
jsany[]YesArray of plain objects whose keys map to column headers
optsJSON2SheetOptsNoOptional settings (same as addJsonToSheet)

Returns

WorkSheet

A new worksheet populated with the given data