Create a Worksheet from a 2D array (array of arrays).
A Date value is written as ISO 8601 UTC text (toISOString()); an invalid Date is skipped.
Date
toISOString()
2D array where each inner array is a row of cell values.
Optional
Options including the origin cell reference.
A new Worksheet populated with the data.
const ws = aoaToSheet([ ['Name', 'Score'], ['Alice', 95], ['Bob', 87],]); Copy
const ws = aoaToSheet([ ['Name', 'Score'], ['Alice', 95], ['Bob', 87],]);
Create a Worksheet from a 2D array (array of arrays).
A
Datevalue is written as ISO 8601 UTC text (toISOString()); an invalid Date is skipped.