Alexey F.
Alexey F.

Reputation: 11

How to share one Google Apps script between few documents?

I wrote short script for numbering of document sections. But every time when I want to use it in new document I must create new copy of that. I tryed to publish the script by option "Deploy as web app..." but it is not clear how to connect it in new document. Is it possible? I have few documents in Google Drive and few copies of same script for each of document. Can I connect every document to one script? Thanks a lot!

Upvotes: 1

Views: 897

Answers (2)

Massimo
Massimo

Reputation: 34

I had a similar problem. The leaner solution that I was able to imagine is to keep the function in a saparate, shared script file. In the spreadsheet script, you will use the shared script file as a library.

In this way, your logic remains in a single copy, the actual part of the logic that is copied several time is only a call to a shared function.

Upvotes: 0

Serge insas
Serge insas

Reputation: 46794

This is not possible for now, there is an open enhancement request that you could star to mark your interest and be informed if something new comes up...

Upvotes: 1

Related Questions