Return data to the sheet

Single values, arrays, and charts are the JavaScript types that can be returned to the sheet. Any data can be structured as an array and returned to the sheet.

Single value

// from variable with assigned value
let data = 5; 

// return this value to the sheet
return data;

1-d array

let data = [1, 2, 3, 4, 5];

return data;

2-d array

let data = [[1,2,3,4,5],[1,2,3,4,5];

return data;

Charts

Last updated

Was this helpful?