0

So, for context, I am doing this for Dungeons and Dragons. I made a character sheet template for my players and I have been regularly updating it. I recently discovered scripts and I've been integrating them into my players sheets.

The problem is that every time I edit or update the code, I have to copy and paste to 6 other files (It uses onEdit).

Is there a way to make it so that I have a single file that applies to all of them?

Ben Craven
  • 37
  • 5
  • 1
    You can put your code in a library and then add it as a resource to the spreadsheet. That way you edit your library and any updates are automatically seen be all the users. See this article https://developers.google.com/apps-script/guides/libraries – TheWizEd Feb 25 '22 at 00:23
  • It's possible to write a script using apps script api that will modify all of you spreadsheets at the same and thus avoid using libraries which have been known to create some difficulties difficulties. I know it possible because I do it. – Cooper Feb 25 '22 at 00:30
  • @Cooper do you have link to more information on that technique? – Mr Shane Feb 25 '22 at 20:16
  • Yeah if you go to the google apps script documentation and click on "Use the Rest API" at the top. It's in there and you can and you can use `"headers": { "Authorization": "Bearer " + ScriptApp.getOAuthToken() }` for authorization. I find using the urls easier to figure rather than using Google Apps Script Directly ...which I don't think that have for this. – Cooper Feb 25 '22 at 20:26
  • I actually have use the code to assemble projects and the only thing I have to go in and tweak is the manifest which I still haven't really mastered. – Cooper Feb 25 '22 at 20:28
  • Related: https://stackoverflow.com/q/65548827/1595451 – Rubén Mar 07 '22 at 22:22

0 Answers0