Skip to content

Instantly share code, notes, and snippets.

@jeffgodwyll
Created June 20, 2017 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffgodwyll/20eac9e61b7bc1ba70d94cc97c08984c to your computer and use it in GitHub Desktop.
Save jeffgodwyll/20eac9e61b7bc1ba70d94cc97c08984c to your computer and use it in GitHub Desktop.
var SPREADSHEET_ID = 'SHEET_ID_HERE';
var SHEET_NAME = 'SHEET_NAME_HERE';
function doGet() {
var range = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(SHEET_NAME).getDataRange();
var json = JSON.stringify(range.getValues());
return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment