function getInfo(){
var id = "xyz";
var sheet = SpreadsheetApp.getActiveSheet();
var lastRow = sheet.getLastRow();
for (var i = 2; i < (lastRow + 1); i++){
var Emails = sheet.getRange(i, getColIndexByName("Email")).getValue();
var row = Compare(Emails, id);
if(row)
PlusFreq(row, id);
else if (checkEmail(Emails))
setEmail(Emails, id);
}
}
My code is working fine , but the method getLastRow();
isn’t working it’s getting null, Why that is happening?
A week ago it was working properly but now does not it, besides I use the method en getLastRow other functions and also was not this working anymore.
I managed to fix the error but do not know what it caused it, simply deleted the blank lines that existed after the 60 lines of content, and added them again, so stopped the error, I’m sure the lines estavao blank. error crazy