Share App Script to Google Sheet template for External use

58 Views Asked by At

First of all I am no pro/ don't really understand coding etc., just using everything that is available online.

I have added to my google sheet template App Script code which works fine. As I will be selling my template later I am adding created Google Sheet to Google template gallery BUT once I do that the Script is no longer working inside the Sheet template (works only in the general file).

What do I do? How do I share it so that anyone who uses my google sheet with "use template" also get it with the function working? Also without authorising into app script.

This will be for external use only, I will not be in contact with the people using the template and I need to make sure once they buy it, it works for them as well.

My code:

function uncheckAll() {

  const ss = SpreadsheetApp.getActiveSheet()

  const range = ss.getDataRange()

  range.uncheck()

}

I have tried making tried - share sheet + script and let anyone who has the link access it.. I have tried to add the app sript inside the template NOT original file. But is does not seem to work. It saves back in the original google sheet... I have also tried managing deployment... but I am no pro at this so either I am not doing something right or that is not the solution.

0

There are 0 best solutions below