Is it possible to hide or remove "File" "Edit" etc menus in a google spreadsheet and only the owner could see them? It works with script created menus but not with the default ones. Is there a workaround to prevent other editors from editing my script? Thanks
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To hide your code: You could create stand alone scripts which contain all the logic and "secret sauce".
then from the speadsheet script just call these scripts as web services passing the necesary parameters.
As for hidding the menu items, you cannot. Only option would be to embed the sheet within a Google Site.
Hope this helps.
回答2:
Yes. Put it on preview mode by url parameter. For example,
From:
https://docs.google.com/document/d/abc_xyz/edit#
To:
https://docs.google.com/document/d/abc_xyz/preview
回答3:
I have a partial solution to hide the code. Create an independant script and use the address of your spreadsheet to work on it:
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheet/ccc?key=01234567890");
SpreadsheetApp.setActiveSpreadsheet(ss);
var sheet = SpreadsheetApp.getActiveSpreadsheet();
You can program the execution of the script( every 2 hours...etc) but you don't have the button in the spreadsheet.