Skip to content

Instantly share code, notes, and snippets.

View ludvigeriksson's full-sized avatar

Ludvig Eriksson ludvigeriksson

View GitHub Profile
@ludvigeriksson
ludvigeriksson / google-sheets-json.js
Last active May 17, 2018 15:41
Read and write data to Google Sheets with a JSON API
// Post method modified from https://github.com/jamiewilson/form-to-google-sheets
// Get method modified from https://ctrlq.org/code/20005-publish-json-google-spreadsheets
var sheetName = "Sheet1";
var sheetId = "1-FuSfuJW...";
function getSheet() {
var book = SpreadsheetApp.openById(sheetId);
var sheet = book.getSheetByName(sheetName);
return sheet;