问题
I'm working on a Google Sheets add-on in Google Apps Script and want to know how I can deploy it and install it into a Google Sheets spreadsheet whilst it is still in development (i.e. not ready to publish in the Store).
At the moment I'm forced to create my add-on embedded within an existing spreadsheet with no option of using it in another.
Has anyone achieved this yet?
回答1:
Yes its posible but first you need to be approved by google to publish. Once you can publish you specify to publish only to a google group and not public (this is standard chrome store functionality)
回答2:
Go to Publish>Test as Add On and Configure a New Test. Testing your script will run the code on a doc of your choosing.
You should be able to take it from there. If you're still having trouble, read on.
To setup the test, you'll need to specify which Document, Form, or Spreadsheet you want to it to run on, and save the test. Then you can run the test (from the Test as Add On popup, by clicking the Test button after you've saved your test setup) and it will execute your code on that document/spreadsheet/form by opening a new tab with that doc and executing your code.
To share the script with others (beyond making them use this same process for themselves by copy/pasting your script in their own Script Editor) you'll need to publish it to the Web Store; to do that you need to do all this stuff.
Hope that helps!
回答3:
I tried to do the same thing but was not able to. I just copied and pasted my code into the script manager to test with different spreadsheets.
Sorry, but I guess not.
来源:https://stackoverflow.com/questions/22664144/deploy-and-use-google-sheets-add-on-with-google-apps-script