# jsonToSheet

Source: /xlsx-format/api-reference/functions/jsontosheet

Create a new worksheet from an array of JSON objects.

This is a convenience wrapper around `addJsonToSheet` that always creates
a fresh worksheet.

```ts
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 `](</xlsx-format/api-reference/interfaces/json2sheetopts/>) | No | Optional settings (same as `addJsonToSheet`) |

## Returns

[` WorkSheet `](</xlsx-format/api-reference/interfaces/worksheet/>)

A new worksheet populated with the given data
