Gists
Description When V8 is enabled, Array.apply has the limitation for the number of elements. When it is over the limitation, an error like RangeError: Maximum call stack size exceeded occurs, while the issue didn’t occur when V8 is disabled. In this case, this issue occurs at both Google Apps Script and Javascript. So please be careful this.
Sample situation For example, when Array.prototype.push.apply is used for combining the arrays because the process cost of Array.
FetchApp was updated to v1.0.1. v1.0.1 (April 13, 2020)
When V8 runtime is enabled, it was found that an error occurred. So this bug was removed. You can check this at https://github.com/tanaikech/FetchApp.
Gists
This sample script is for expanding a1Notations using Google Apps Script. This was updated from this sample script.
Sample script function expandA1Notations_(a1Notations, maxRow, maxColumn) { maxRow = maxRow || "1000"; maxColumn = maxColumn || "Z"; // Ref: https://stackoverflow.com/a/21231012/7108653 const columnToLetter = column => { let temp, letter = ""; while (column > 0) { temp = (column - 1) % 26; letter = String.
The drawing objects on Google Spreadsheet got to be able to be managed by the update at April 2, 2020. Ref
By this update, we can assign the function to the drawing objects and remove the drawing objects. The following sample is for removing the drawing objects on the active sheet. Ref
SpreadsheetApp.getActiveSheet() .getDrawings() .forEach(e => e.remove());
Gists
This is a sample script for retrieving the overwrapped cells between 2 ranges on Google Spreadsheet using Google Apps Script. Please use this with enabling V8.
const getOverwrappedRanges_ = (rangeList1, rangeList2) => { if ( rangeList1.toString() != "RangeList" || rangeList2.toString() != "RangeList" ) { throw new Error("Input RangeList object."); } // Ref: https://stackoverflow.com/a/21231012/7108653 const columnToLetter = column => { let temp, letter = ""; while (column > 0) { temp = (column - 1) % 26; letter = String.