I want to, by using python googleapiclient.discovery, sort a google sheet by a column of dates. I assume there may be a way to do this via batchUpdate, given this, but I can't quite figure out what the syntax would be here.
In gs, the sort I want to do looks like:
function myFunction() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Test");
var range = sheet.getRange(3, 1, sheet.getLastRow() - 1, sheet.getLastColumn());
range.sort(1)
}
I did see that there is a way using googleapiclient (.scripts()) to call a gs script like above but I want to avoid turning this into a Cloud Project. I am also aware that a script like above could be set on an on edit trigger but ideally I do not want to not trigger this on every change, only when another external job runs.