0
Hello I came across the following situation: I just need to use a class method Selection
from Google Spreadsheetapp in an enabled selection, but it is bringing the following bug:
ReferenceError: "Direction" não está definido.
But I’ve already looked at documentation on the subject and it follows that I still could not find the error.
Because Direction is not being recognized?
function ok() {
var s1 = SpreadsheetApp.openById("PUT YOUR SPREADSHEET ID").getSheets()
var s2 = s1[0]
var s3 = s2.getRange("C4").activate()
var s5 = SpreadsheetApp.getSelection().getNextDataRange(Direction.DOWN).getValues()
var s4 = SpreadsheetApp.openById("PUT YOUR SPREADSHEET ID").getRange("C5:C8").setValues(s5)
return s4
}
Hi. Already enjoying the discussion:
function ok() {
 SpreadsheetApp.openById("ID").setActiveRange("B2").activateAsCurrentCell();
 SpreadsheetApp.getSelection().getNextDataRange(SpreadsheetApp.Direction.FORWARD)
}

for the second time when I will use Spreadsheetapp Object, my previous selection will be available?– Juliano Henrique