brucemcpherson / desktopliberation

hosting for desktop liberation google plus community
30 stars 1 forks source link

Import, export and mix container bound and standalone Apps Script projects #122

Open brucemcpherson opened 2 years ago

brucemcpherson commented 2 years ago

This article covers how to pull scripts from multiple projects and import them into another project. You can even use this to make container bound script standalone, or visa versa. My initial motivation for this was connected to another set up posts related to Merging sheets from multiple sources and encrypting selected columns and Add-on for decrypting columns in Google Sheets. This creates a spreadsheet with encrypted columns, and the add-on decrypts them.

I didn’t want to go to the bother of publishing add-ons, but I did want be able to create a spreadsheet and push the add-on to it as a container bound script instead. Of course there are plenty of other uses, but distributing new spreadsheets with container bound apps already embedded was my initial objective. This article will cover the library that does all that, along with various other usage examples – for example, pulling in code snippets from or libraries, merging manifests, or testing add-ons.

This version of the library uses the Apps Script API to pull code from Scripts to which you have access. I’ll add other script sources if there’s a demand, for example, GitHub.

https://ramblings.mcpher.com/apps-script/add-ons/import-scripts/