Thank you! Works like a charm!
Hi, thank you for the tutorial!
I got one request if it's possible. Can you make a script that shorts the data by column after sending data from Construct to spreadsheet? I'm going to make a leaderboard so it should be sorted descending. I tried to add this code to your script but it didn't work. Can you help?
/**
* Automatically sorts the 3rd column (not the header row) Descending.
*/
function onEdit(event){
var sheet = event.source.getActiveSheet();
var editedCell = sheet.getActiveCell();
var columnToSortBy = 3;
var tableRange = "B1:E500"; // What to sort.
if(editedCell.getColumn() == columnToSortBy){
var range = sheet.getRange(tableRange);
range.sort( { column : columnToSortBy, ascending: false } );
}
Member since 29 Nov, 2015