addJsonToSheet
On this page
Add an array of JSON objects to an existing worksheet, or create a new one.
Object keys become column headers (written in the first row unless
skipHeader is set). Supports dense and sparse storage, origin offsets,
date handling, and automatic type detection.
addJsonToSheet(existingSheet: WorkSheet | null, jsonData: any[], opts?: JSON2SheetOpts): WorkSheet
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
existingSheet | WorkSheet | null | Yes | An existing worksheet to append to, or null to create a new one |
jsonData | any[] | Yes | Array of plain objects whose keys map to column headers |
opts | JSON2SheetOpts | No | Optional settings (header, origin, dense, skipHeader, cellDates, UTC, dateNF, nullError) |
Returns
The updated or newly created worksheet