Redash To Google Sheets Using Google Script - How Do I Add The Date At The End?
I'm trying to use the following Google script to add data from Redash, then add the current date at the end. Where could I add a var now = new Date(); to input the date on the las
Solution 1:
Well, you row number addressing is a bit confusing, cause sheet.getLastRow() would change every time you add values after the last row, but you can write something like
sheet.getRange(sheet.getLastRow() + num1, 6).setValue(newDate());
to insert date. You can refer other answers, like
How to format a JavaScript date
for date formatting.
Post a Comment for "Redash To Google Sheets Using Google Script - How Do I Add The Date At The End?"