This file contains hidden or 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 splitdate2() { | |
var ss = SpreadsheetApp.openById("--Your Spreadsheet ID--"); | |
var sd = ss.getSheetByName("--Spreadsheet name--"); | |
//find the last row of col. E, which is the no. of days formula | |
var Evals = sd.getRange("E1:E").getValues(); | |
var Elast = Evals.filter(String).length; | |
/*find the last row of col. A, which is your data. In case you paste more data appended to Column A, |
This file contains hidden or 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 retrieveKimonoinGAS() { | |
//Retrieve data from the below Kimono API URL. &Kimmodify=1 only if you have modified your API through Modify Results function | |
var url = 'https://www.kimonolabs.com/api/csv/--apiID--?&apikey=--apikey--&kimmodify=1'; | |
var options = { | |
'method': 'GET', // Method refers to 'Get' or 'Post'. Kimono API supports GET method. | |
'contentType': 'application/json', // refers to type of data being pulled from Kimono API, in this case is JSON | |
'muteHttpExceptions' : true | |
}; |
This file contains hidden or 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 copyandpaste() { | |
// Define your variables | |
var ss = SpreadsheetApp.openById("--GoogleSheetsID--"); // Obtain the ID of your spreadsheet from https://docs.google.com/spreadsheets/d/--GoogleSheetsID-- | |
var OrigSheet = ss.getSheetByName("Sheet1"); // getSheetByName allows you to select the sheet by sheet name. Get the Origin sheet to be copied | |
var source = OrigSheet.getRange ("A3:F13"); // get the range of cells to be copied | |
var destSheet = ss.getSheetByName("Summary"); // get the Destination sheet to be pasted | |
var destRange = destSheet.getRange(destSheet.getLastRow()+1,1); // I want to paste the data in the next empty row, so i use getLastRow()+1 | |
source.copyTo (destRange, {contentsOnly: true}); |
This file contains hidden or 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 transform (data) { | |
function add_date(item) { | |
item.date = new Date(); | |
return item; | |
} | |
for (var collection in data.results) { | |
data.results[collection] = data.results[collection].map(add_date); | |
} | |