Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

610
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!