How to share Google Sheets and AppsScript linked to the sheet? -


i have google sheet. have developed apps script manipulates sheet. apps script has lots of different files: bunch of gs files , bunch of html files. when make copy of sheet, notice function:

var script_project_key_cell_index = "b2"; var settingssheet = "configuration settings"; var settings = spreadsheetapp.getactivespreadsheet().getsheetbyname(settingssheet); var project_key = settings.getrange(script_project_key_cell_index).setvalue(getscriptprojectkey()); 

returns same value in both original , copy of sheet. notice 'make copy' option under code editor file menu. when create copy of code itself, seems create copy - spreadsheet copy linked to?

question have how make sure when send google spread sheet 1 of clients, script associated sheet sent , change or modifications client not affect original sheet , scripts associated it.

if have created an embedded app script sharing spreadsheet lead sharing of app script code.

however if have created standalone app script , linked spreadsheet sharing spreadsheet not sufficient, have share app script well.

in app script code if have referenced spreadsheet it's key have change part of after making copy otherwise continue reference previous key. same true if have used other key project id , other keys needs changed after making copy accordingly.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -