google-apps-scriptgoogle-sheets

Access functions from multiple Google Apps Projects


Is there a way in Google Apps Scripts to create a function that can be accessed from multiple projects/spreadsheets?

When I'm in a Google Spreadsheet, I go to Tools > Script Editor... and I create a Project. Then I create functions within that project. Then I have other spreadsheets that I'd like to be able to use those functions in, without having to copy and paste them into each project. If they only existed in one place, it would be easier to update them. Thanks!


Solution

  • Apps-Script Libraries

    A library is a project that can be included by you or other developers to gain access to its functions. To learn how to properly write, include and use a library, see the sections below.

    https://developers.google.com/apps-script/guides/libraries