After scratching my head, I am on the lookout for guidance in the right direction to solve my issue. I have a Google spreadsheet with multiple rows, but I only need the script to focus on the newest row.
Despite not having undergone any formal computer training, I am learning things by trial and error, though probably not in the most efficient manner.
I am currently working on filling a series of variables with cell values - Data1, Data2, and so on until the row is complete based on the number of columns. I am only interested in processing one row.
At the moment, I am fetching each value individually like this:
var Data1 = sh.getRange(row,1).getValues()[0];
var Data2 = sh.getRange(row,2).getValues()[0];
var Data3 = sh.getRange(row,3).getValues()[0];
var Data4 = sh.getRange(row,4).getValues()[0];
and repeating this process...
This method is quite inefficient, so I was considering using arrays (if that's the solution) to loop through the single row and generate an array that I can later reference in HTML code, like this:
<td width="443" bgcolor="#FFFFFF" colspan="3">' + Data1 + '</td><td width="245" b....
If someone could recommend examples where I can better understand how arrays can be helpful, as most resources I found discuss 2D arrays without explaining how to retrieve the values afterwards...
Any assistance would be greatly appreciated...
J