Reputation: 187
I have some Google Apps Script functions which are to be made available to many spreadsheets. Perfect candidate scenario for a library object. I can write a stand alone script and include this as library resource for other spreadsheets. I can also create a Spreadsheet with attached script and similarly use the script object as other spreadsheets' library resource. If I keep the library script bound to a spreadsheet I have a more rich development environment (my code has an activespreadsheet object at runtime) than if I maintained a stand alone script, bound to no spreadsheet object.
My question is - are there any disadvantages to maintaining library functions in a script attached to a spreadsheet, rather than maintaining a stand-alone script?
Upvotes: 1
Views: 1076
Reputation: 17613
Not really. Bound scripts can call a few methods that standalone scripts cannot like the ones mentioned in Special methods.
You can check info about Standalone scripts in the official doc.
Upvotes: 1