Is there a way you can setup a Google Script project to be accessible from any and all documents in the owner's drive?
For example, I end up writing a few custom functions for most of my spreadsheets that Google Sheets is missing, but I don't want to have to create a Script container attached to each document, copy the code from one project over to this new project, and then use it. Not only is it cumbersome, but it's very difficult to organize if a change needs to be made.
I tried using my "master" project as a library on a new sample sheet I made, but the functions in the library are inaccessible from within the sheet, so that's a no-go. As I understand it, publishing and Add-on or Web-app requires making an interface which is unnecessary for my use-case, as I'm just trying to call functions from within the sheet. Even a rudimentary interface would just slow the process down as I'd have to manually load up the add-on and find whatever function I need to use, and click on it.
Let's say I have a project that just contains:
/**
* Returns value plus one.
*
* @param {num} Input the value to add one to.
* @return Result.
* @customfunction
*/
function addOne(input) {
var result = input + 1;
return result;
}
I find myself needing to "add 1" to the value of a cell constantly from many different spreadsheets which may or may not be related in any way. I'd like to be able to call this function from my personal script file from any spreadsheet simply by entering =addOne(Sheet1!A1)
.
Is this possible?