I am new to using Google App Script and I don't understand fully how the "Logger.log" command works.
I'm working with Google App Script as a bound script to a spreadsheet. Below is a snipet of the code I am working on:
function tasks() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Task List");
sheet.activate();
var hi = 23;
Logger.log(hi);
Logger.log("The range is " + sheet.getRange(1, 1, 10, 1));
}
When I run the code, this is displayed in the logger:
[16-06-02 00:56:12:129 EDT] 23.0
[16-06-02 00:56:12:130 EDT] The range is Range
Why is it displaying "Range" for the sheet.getRange function rather than the array of data.
Also can someone please explain the difference between "getRange" and "getDataRange".