I wrote a script for a spreadsheet template. My user makes copies from the spreadsheet template and the attached script. There are many such instances both spreadsheet and the script. When I update the script for the spreadsheet template, I(or my user) have to manually update all scripts attached to spreadsheets. All scripts are the same. Is there a way to synchronize the script update automatically?
0
votes
1 Answers
1
votes
What you can do is maintain a single standalone script and publish it as a library instead of having it reside in the spreadsheet template. This way, you have to change the script in only one place. To work with triggers such as onOpen, onEdit etc. you can have shell functions in your spreadsheet template. Something like
function onOpen(e){
LibraryName.onOpen(e);
}