0
votes

I have an active spreadsheet, I want to select a cell in this spreadsheet and then bring me to another Spreadsheet. I used app.openByUrl to open the spreadsheet and then get my wanted sheet by name and then activate the cell by getRange, the script is finished but it didn't take me from the active spreadsheet to the other spreadsheet, the cursor remains in the cell of the active Spreadsheet. I use the following code. Does anyone has an idea?

app.openByUrl("https://docs.google.com/spreadsheets/d/1S9Kc6foLZ_bXqs4/edit#gid=502179704").getSheetByName("Verification Candidates").getRange('D4:F4').activate();

1
You might want to take a look at the onSelectionChange()Cooper

1 Answers

0
votes

It's not possible to activate an external spreadsheet by solely using Google Apps Script as

  1. Class Spreadsheet doesn't include like similar to Class Range activate
  2. The Class Spreadsheet "open" methods open the spreadsheet on the server side, not on client side.

You might be able to do what you are looking by using other tools (i.e. a complex bookmarklet)