Skip to content

Instantly share code, notes, and snippets.

View tusharacc's full-sized avatar

Tushar Saurabh tusharacc

View GitHub Profile
@tusharacc
tusharacc / createJSON.js
Last active January 15, 2016 18:45
App Script to create a JSON from google spreadsheet
function doGet(e) {
var json = convertSheet2JsonText();
return ContentService.createTextOutput(JSON.stringify(json))
.setMimeType(ContentService.MimeType.JSON);
}
function convertSheet2JsonText() {
//XXXX is the id of the spreadsheet.ID is in the spreadsheet url - docs.google.com/spreadsheets/d/XXXX/editkkkk
var sheet = SpreadsheetApp.openById("XXXX").getActiveSheet();