Custom function throws a “You do not have the permission required to setValue” error

from the documentation : Custom functions return values, but they cannot set values outside the cells they are in. In most circumstances, a custom function in cell A1 cannot modify cell A5. However, if a custom function returns a double array, the results overflow the cell containing the function and fill the cells below and … Read more

Google Apps Script Auto Generated Library Documentation

The jsdoc variant suported for libraries in Google Apps Script does not support documentation at the level you are looking for, only first-level functions. There is a relevant open bug report on this, but no response from Google. You can still write your jsdoc tags, and generate your documentation outside of the Google infrastructure. Take … Read more

How to get filtered values from Filter after using setColumnFilterCriteria?

You want to retrieve values from the filtered sheet in the Spreadsheet. You want to achieve this using Google Apps Script. If my understanding is correct, how about this answer? Issue and workaround: Unfortunately, the values cannot be retrieved from the filtered sheet using getValues(). This has already been mentioned by TheMaster`s comment. As the … Read more

Is there a complete definition of the Google App Script Syntax somewhere? [duplicate]

The GAS is not a precise version of JavaScript. It supports many features of JavaScript 1.8.5 like Object.keys, Object.isExtensible, etc. but on the other hand it does not support the keywords yield and let introduced in JavaScript 1.7. Another features which the GAS supports are the native JSON class and String.trim function introduced in JavaScript … Read more

Using built-in spreadsheet functions in a script

Google Apps Script is a subset of JavaScript, spreadsheet functions are currently not supported. For example, if you want to create a function that returns today’s date you should write : function test_today(){ return new Date() }// note that this will eventually return a value in milliseconds , you’ll have to set the cell format … Read more

copy data from one sheet to another in google app script and append a row, one small issue

You can copy whole range at once using copyTo, so your function could be rewritten as: function copyInfo() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var copySheet = ss.getSheetByName(“Copy”); var pasteSheet = ss.getSheetByName(“Paste”); // get source range var source = copySheet.getRange(2,2,12,2); // get destination range var destination = pasteSheet.getRange(pasteSheet.getLastRow()+1,2,12,2); // copy values to destination range source.copyTo(destination); // … Read more