function onEdit(){
  emailEOnEdit();
}
  

function emailEOnEdit() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet();
  var rows = sheet.getDataRange();
  var numRows = rows.getNumRows();
  var values = rows.getValues();
var recipients="[email protected]"
  for (var i = 0; i <= numRows - 1; i++) {
    var row = values[i];
    Logger.log(row);

  MailApp.sendEmail(recipients, " a row has been changed",
        "new value: " + row + "\n\n" + sheet.getUrl());

  
  }
}



using the above code, i am getting five different mails(sheet has 5 rows) 
on editing even one cell, i want to retrieve only the row in which a 
modification has been made, please help 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to