Skip to content

Instantly share code, notes, and snippets.

View kylesloper's full-sized avatar
Building robust apis

kylesloper

Building robust apis
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
# Example encoding of an email message in JSON
{
headers: [ # in an array since order matters
{ name: 'Subject', value: 'An email' },
{ name: 'Date', value: 'Thu, 4 Mar 2010 15:35:32 -0800' },
{ name: 'From', value: '[email protected]' },
{ name: 'To', value: '[email protected]' }
{ name: 'Sender', value: '[email protected]' }
{ name: 'Reply-to', value: '[email protected]' }