I'm using Siri Shortcuts to input Data with google scripts to a google sheet. I've found ways to add data but it used appendRow which adds data to a new Row.
I'm running 2 scripts, one which adds data to the first three columns in a new row.
I want the next script to write Data on the next 2 columns, instead of starting on a new row but I have no idea how to do that.
I have absolutely no idea what I'm doing, I'm very new to coding so I'm sincerely sorry for all the trouble.
I searched and came across scripts to find the last row that contains data, but I have no idea how to add data to it.
I found this page, but I still have no idea: Determining the last row in a single column
This is the code I'm using to add data to the first 3 columns in a new row:
var ss = SpreadsheetApp.openById("").getSheetByName('');
function doGet(e) {
var mood = JSON.parse(e.parameters.mood)
var formattedTime = Utilities.formatDate(new Date(), "GMT+530", "h:mm a");
var formattedDate = Utilities.formatDate(new Date(), "GMT+530", "MM/dd/yyyy");
ss.appendRow([formattedDate,formattedTime,mood]);
}