Created
November 1, 2013 18:40
-
-
Save mattash/7269866 to your computer and use it in GitHub Desktop.
Google Spreadsheet AppScript that publishes JSON of a Sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getTickets() { | |
var sheet = SpreadsheetApp.openById("SPREADSHEET_ID").getSheetByName("SHEET_NAME_WITH_SUM"); | |
var count = sheet.getRange("LOCATION_OF_CELL"); | |
return count.getValue(); | |
} | |
function doGet() { | |
var result = { | |
"TITLE_OF_SUM":this.getTickets() | |
} | |
return ContentService.createTextOutput(JSON.stringify(result)).setMimeType(ContentService.MimeType.JSON); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment