Google Apps Script: llamar a una función desde el menú con un rango de hoja de cálculo como parámetro

Tengo una función que acepta un rango de hoja de cálculo como parámetro, luego agrega una fecha en la misma fila que el rango dado.

function autoDate(cell) {
  var currentDate = new Date();
  var currentMonth = currentDate.getMonth() + 1;
  var currentDateStr = new String();
  currentDateStr = currentDate.getDate() + "/" + currentMonth;
  var sheet = SpreadsheetApp.getActiveSheet();

  if (cell.getValue() == ""){
    var activeRowInt = cell.getRow();
    var dateCell = sheet.getRange(activeRowInt,3); //3 is my date column
    dateCell.setValue(currentDateStr);
  }
}

Tengo un menú donde ejecuto una función separada que llama a autoDate () con la celda activa como parámetro (ya que el sistema de menús no permite llamar a funciones con parámetros)

function autoDateMenu(){
  var sheet = SpreadsheetApp.getActiveSheet();
  var activeCell = sheet.getActiveCell();
  autoDate(activeCell);
}

Si ejecuto autoDateMenu () desde el editor de scripts, funciona bien. Si ejecuto autoDateMenu () seleccionándolo en el menú de la hoja de cálculo, aparece el siguiente error:

TypeError: No se puede llamar al método "getValue" de undefined. (línea 64, archivo "Código")

La línea 64 se refiere a esta línea:

if (cell.getValue() == ""){

Aquí está el código que escribí para el menú:

function onOpen() {
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var entries = [{
    name : "Read Data",
    functionName : "readRows"
  },{
    name : "Set Date",
    functionName : "autoDateMenu"
  }];
  spreadsheet.addMenu("Script Center", entries);
}

Gracias por responder :)

Respuestas a la pregunta(1)

Su respuesta a la pregunta