I have a sheet with IMPORTHTMLIMPORTHTML
that I want to copy data from one column to a new column daily.
function saveData() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.setActiveSheet(spreadsheet.getSheetByName('Daily ledger'), true);
spreadsheet.getRange('x3:x96').activate();
spreadsheet.getRange('N3:N96').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
}
This script works well, but I have to change 'x3:x96'x3:x96
every day (tomorrow I would have to change it manually to 'y3:y96'y3:y96
etc.), I also have to change the trigger date daily.
Is there a way to do it automatically? To have a script paste in a new column every day?
I know there is a way to do it in new row, but that is not what I am looking for.