March 2016
Beginner to intermediate
232 pages
4h 29m
English
Now, we will see how to return JSON string instead of HTML content. In the Data Sheet, add another column named DOB as shown here:

Create the doGet
function as shown here:
function doGet(){ /* * This spreadsheet may not be active while this function * executes, so you cannot get access to active spreadsheet, * use open by id. * */ var ss = SpreadsheetApp .openById("Replace with this spreadsheet id"); var SheetData = ss.getSheetByName("Data"); var data = SheetData.getDataRange().getValues(); // Remove header data.shift(); var date = new Date(); var currYear = date.getFullYear(); var output = {}; data.forEach(function(row){ ...Read now
Unlock full access