I'm bulding a webApp w/ Google App Scripts. In my main .gs file, I'm trying to get & return the values from a data range in my connected sheet. My function below seems to only return the values for column 1 in the range when it has 4 columns.
What am I doing wrong?
function loadBoats(){
var ss = SpreadsheetApp.openByUrl("* myspreadSheet url*");
var ws = ss.getSheetByName("DB1.vessels");
var boats = ws.getRange(1,1,ws.getRange("A1:D12").getDataRegion().getLastRow(),1).getValues();
Logger.log(boats);
return boats;
}
Picture for logs:
Additionally:
I don't understand the structure of the first .getRange() method w/ 4 parameters. This is the YT link I am following along w/ - Youtube tutorial on the subject
