I'm trying to write a custom function for Google Sheets but am running into permission errors left and right. Just to get things started, I typed this into the top left cell: "=testFunction()"
. In the function, I tried to highlight and select a row based on the user, and came up across the following issues:
- I don't have permission to call the
Session.getActiveUser()
method, so I can't do anything based on the user accessing the document. Also, thegetUrl
function doesn't return the actual URL, so putting something like "#Jeff" at the end won't work. Note: I did eventually get around this because much to my surprise, theSpreadsheet.getViewers
function works. - I don't have permission to run the
Spreadsheet.setActiveSelection()
function, so I can't select a row. - I don't have permission to change the background for cell B if I run the function from cell A. This means I need to put my broken highlight function in every cell that I want to change color.
It's getting frustrating to look up how to do something, test it, and watch a permission error pop up three out of four times.
Considering that I'm the owner of this document, is there any way to change what I have permission to do?
If not, is there any documentation for what functions I can run?