Last active
November 28, 2022 15:41
-
-
Save huynguyennovem/19a960ce3dd4b7a711c0441386d59b17 to your computer and use it in GitHub Desktop.
Google codelabs tool App script
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 doGet(request) { | |
var sheet = SpreadsheetApp.openById("1bzuFEiI9Sh3fT_nY84b2JdTqzhpVHkU00VKsVhKOr4U"); | |
var values = sheet.getActiveSheet().getDataRange().getValues(); | |
var data = []; | |
for (var i = 1; i < values.length; i++) { | |
var row = values[i]; | |
var datas = {}; | |
datas['Timestamp'] = row[0]; | |
datas['Your email'] = row[1]; | |
datas['Joined codelab'] = row[2]; | |
datas['How to get a certificate'] = row[3]; | |
datas['Link public profile'] = row[4]; | |
data.push(datas); | |
} | |
return ContentService.createTextOutput(JSON.stringify(data)).setMimeType(ContentService.MimeType.JSON); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment