Although I am new to Google Apps Script I managed to write a onEdit(e)
function with a couple of other functions which are called using Switch Case. I googled how to hide the script from others when I share the file and it said that we could do this by creating a standalone file for the script and use the spreadsheet id like SpreadsheetApp.openById(SPREADSHEET_ID)
instead of SpreadsheetApp.getActiveSpreadsheet()
. Here in my case, there is no such code. I have a onEdit(e) file and I use e.
whenever I refer to a range/cell. Could someone help with this?
Asked
Active
Viewed 31 times
0

Codist
- 737
- 8
- 23
-
A bounded script can't be hidden from editors, instead create an add-on – Rubén Nov 13 '22 at 12:42
-
1@Rubén true, but onEdit() and addons don't go hand in hand in my experience – RemcoE33 Nov 13 '22 at 13:12
-
I have no idea what lead you to have that experience. In my experience onEdit works pretty well with Google Sheets add-ons – Rubén Nov 13 '22 at 13:23
-
@Rubén I have created a new standalone Apps Script and put my code in it. Can you tell me what's next, please? – Codist Nov 13 '22 at 14:00
-
@Codist There are a lot of step-by-steps guides on the web. I suggest you to start looking at https://developers.google.com/apps-script. They have complete Editor add-on examples, guides, codelabs. Here are a couple of specifi links: 1) https://developers.google.com/apps-script/add-ons/editors/sheets/quickstart/attendance 2) https://developers.google.com/apps-script/add-ons/clean-sheet – Rubén Nov 13 '22 at 14:41