24

I have a corporate google account (with a domain) and I've created a script to access a database, to share data between some spreadsheets to make simulations.

I created some custom functions like =listAllCustomers() and now I want to use with any spreadsheets.

How can I do that?

In a sheet, I can add custom code via "Add On", but how can I share scripts in my domain?

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • 1
    Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer! Also see [how to ask](http://stackoverflow.com/help/how-to-ask) – Scott Solmer Oct 29 '14 at 12:30
  • 1
    I'll not post this as an answer since I'm not sure. But I think you'll have to deploy this as an Add-on visible only to your domain (if this my-domain-only feature is not available it'll probably be in the future). Then, as the domain admin, force install/enable this add-on for your domain sheets. But the crude solution we had before add-ons was to simply copy this script inside every Sheet you needed it. Or have a template sheet that people copy from to generate new sheets. – Henrique G. Abreu Oct 29 '14 at 12:47
  • 1
    possible duplicate of [Google Spreadsheet Scripts shared across spreadsheets (not libraries)](http://stackoverflow.com/questions/14473368/google-spreadsheet-scripts-shared-across-spreadsheets-not-libraries) – Mogsdad Oct 29 '14 at 13:14
  • 1
    @HenriqueAbreu "Add-on visible only to your domain (if this my-domain-only feature is not available it'll probably be in the future)" I've tried that, but after publishing, I can not see in the "Add on Store", even filtering by my domain. Actually, I don't know where is this published. Via admin panel, I can only publish "App Engine Apps". – Rodrigo Pereira Fraga Oct 29 '14 at 14:31
  • 1
    @Mogsdad The solution there (one year ago) doesn't work for me, because of my limitation of creating templates... – Rodrigo Pereira Fraga Oct 29 '14 at 20:01

1 Answers1

10

OK, I found the answer. With the new google approach, all scripts are managed as scripts, so to share a script, even in a private domain, you need to publish on the "add-on store".

I just follow these steps and in a few days I solved my need. https://developers.google.com/apps-script/add-ons/publish