2

Google recently added a feature where you can create custom shortcuts by linking it to Google App Script code. It seems pretty good and useful, except it seems the macros need to be setup spreadsheet by spreadsheet instead of in general across all spreadsheets.

I don't know about you guys, but I have multiple multiple Spreadsheets... close to 1,000 Spreadsheets that I edit sometimes. It would be impossible to import the macros one by one spreadsheet. Does anybody know how to do it for the "environment" as opposed to just one spreadsheet?

Seems like a great improvement for Google sheets, but kinda useless for me because I use so many spreadsheets.

Edit: I want to be able to write one macro and use it in any spreadsheet. I'm confused on whether this can be done because on one hand I read the docs and it said macro can't be distributed, but on the other hand other people have said you can do it by using GAS.

One of the comments below is absolutely correct, it is like the personal.xlsb excel workbook concept. In my opinion, shortcuts are useful only if they work all the time, it is a habit thing. It only is useful when it is consistent.

Google built-in shortcuts are useful because they work across all spreadsheets. If you had to set it up for each individual spreadsheet, I bet you no one would use them.

I wish google build in a developer mode or something that make them work for each spreadsheet without doing anything. I understand there are security concerns. But Google can figure it out.

If someone knows how to do it with GAS please post.

jason
  • 3,811
  • 18
  • 92
  • 147
  • 1
    When you say "sheet by sheet" do you mean "spreadsheet by spreadsheet" or actual are you talking about sheets like on `Sheet1!A1`, `Sheet2!A1`, etc.? – Rubén Jul 10 '18 at 15:33
  • 1
    @Rubén. I just edited the question. I meant spreadsheet by spreadsheet. – jason Jul 10 '18 at 20:11
  • I think you can use [Apps-script-api](https://developers.google.com/apps-script/api/) to create bound scripts to all those different spreadsheets. But,I'm not sure – TheMaster Jul 10 '18 at 21:47
  • 2
    @tehhowch As per docu,THINGS YOU CANT DO: Use macros outside bound scripts Macros are defined in scripts bound to specific Google Sheets. Macro definitions are ignored if defined in a standalone script or web app. Define macros in Sheets add-ons You cannot distribute macro definintions using a Sheets add-on. Any macro definitions in a Sheets add-on project are ignored by users of that add-on. Distribute macros in script libraries You cannot distribute macro definitions using Apps Script libraries. `Hence,It's not a duplicate` – TheMaster Jul 10 '18 at 21:49
  • @I'-'I That [reference](https://stackoverflow.com/questions/14791331/scripts-available-for-all-my-google-docs-spreadsheets) is more in regards to the `"does anybody know how to do it for the *environment*"`, as that is basically Excel's `Personal.xlsb` workbook. At the time of the flag this question still said "sheet" and not "spreadsheet" so it wasn't entirely clear what limitations could apply. Given of course that macros in add-ons aren't used, OP has no real benefit from making an add-on except to be able to make a sidebar with buttons for various functions they want to use. – tehhowch Jul 10 '18 at 22:01
  • @tehhowch I understand. Thank you for removing the comment. – TheMaster Jul 10 '18 at 22:07
  • @jason Can I ask you about your question? You have a macro. You want to copy the macro to several spreadsheets. If my understanding is correct, you can achieve it using Google Apps Script API as I'-'I said. But at your first question, you didn't use the tag of "google-apps-script". So can I ask you about what you want? The information whether it can be achieved? The flow for achieving it? or The sample script for it? If I misunderstand your question, I'm sorry. – Tanaike Jul 10 '18 at 23:47
  • 1
    @I'-'I If my understanding for OP's question is correct, it can be achieved using Google Apps Script API as you say. – Tanaike Jul 10 '18 at 23:47

0 Answers0