I've been working/researching this for a few days and get close, but need to add an element of automation, my current scripts are not suitable for the end goal.
I need to:
- Grab a URL from a cell on my primary "generator" sheet.
- The URL points to a completely separate Google Sheet.
- I need to grab a specific named sheet tab, from the externally linked Google Sheet, and bring it into my master doc, as a new sheet tab.
- The source cell with the URL, may be replaced with a new link, hence the automation required. I do not want to have multiple scripts with hard-coded sheet IDs or URLs.
- The URL link may change, but each external sheet will have a tab with the same name, so that remains consistent.
It seems if I store the URL cell (B28 in this case contains the URL) as a variable in the script, it no longer becomes readable. EG:
var SPREADSHEET_URL_REFERENCE_SOURCE_SHEET = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Calc Generator");
var SPREADSHEET_URL_REFERENCE_SOURCE_RANGE = SPREADSHEET_URL_REFERENCE_SOURCE_SHEET.getRange("B28");
var SPREADSHEET_URL_VALUE = SPREADSHEET_URL_REFERENCE_SOURCE_RANGE.getValues();
Afterwards my script can no longer grab the URL. Any help would be appreciated, I'm a little snow blind at this point!
Afterwards my script can no longer grab the URL.
. Can you explain about the detail of it? 2. IfAfterwards my script can no longer grab the URL.
is your issue and you want to resolve it, what isI need to:
? Are we required to prepare the script achieving all ofI need to:
? – Tanaike