Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

618
Vistas
Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Sheet.activate

I have the following code working perfectly as desired... It completes all the tasks as expected but still populates a red error box advising me of an Exception. It's definitely completing all of the tasks, so I can't tell what I've got wrong in here but maybe I'm just using the wrong syntax somewhere? I'd appreciate any help.

Error Message: Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Sheet.activate

Here is a link to my example sheet

function AddRoutedOptions() {
  var ui = SpreadsheetApp.getUi(); // Same variations.
  var result = ui.alert(
      'Add all Routed tasks to the Project Tracker?',
      'Are you sure you want to add all Routed tasks to the Project Tracker?',
      ui.ButtonSet.YES_NO);

  // Process the user's response.
  if (result == ui.Button.YES) {
    // User clicked "Yes".
  var pglc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Pre-Go Live Checklist');
  var vcc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Video Course Checklist');
  var rsc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Routed Setup Checklist').activate();
    pglc.getRange('B32:B35').copyTo(pglc.getRange('E23:E26'), {contentsOnly:true});
    vcc.getRange('B32:C37').copyTo(vcc.getRange('G10:H15'), {contentsOnly:true});
    rsc.activate('Routed Setup Checklist');
} else {
    // User clicked "No" or X in the title bar.
    ui.alert('No tasks were added.');
  }
}

function RemoveRoutedOptions() {
  var ui = SpreadsheetApp.getUi(); // Same variations.
  var result = ui.alert(
      'Remove all Routed tasks from the Project Tracker?',
      'Are you sure you want to remove all Routed tasks from the Project Tracker?',
      ui.ButtonSet.YES_NO);

  // Process the user's response.
  if (result == ui.Button.YES) {
    // User clicked "Yes".
  var pglc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Pre-Go Live Checklist');
  var vcc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Video Course Checklist');
  var rsc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Routed Setup Checklist').hideSheet();
    pglc.getRange('E23:E26').clearContent();
    vcc.getRange('G10:H15').clearContent();
    rsc.hideSheet('Routed Setup Checklist');
} else {
    // User clicked "No" or X in the title bar.
    ui.alert('No tasks were removed.')
  }
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Sheet.activate() does not accept parameters

rsc.activate('Routed Setup Checklist');

ref

Try changing this:

var rsc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Routed Setup Checklist').activate();
    pglc.getRange('B32:B35').copyTo(pglc.getRange('E23:E26'), {contentsOnly:true});
    vcc.getRange('B32:C37').copyTo(vcc.getRange('G10:H15'), {contentsOnly:true});
    rsc.activate('Routed Setup Checklist');

to this:

var rsc = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Routed Setup Checklist');
    pglc.getRange('B32:B35').copyTo(pglc.getRange('E23:E26'), {contentsOnly:true});
    vcc.getRange('B32:C37').copyTo(vcc.getRange('G10:H15'), {contentsOnly:true});
    rsc.activate();
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda