tanaike

The Thinker

GAS Library - UtlApp

Overview This is a Google Apps Script library including useful scripts for supporting to development of applications by Google Apps Script. In the current stage, the 3 categories “For array processing”, “For binary processing”, and “For string processing” are included in this library. Description When I create applications using Google Apps Script, there are useful scripts for often use. At that time, I thought that when those scripts can be simply used, they will be useful not only to me but also to other users.

Unpivot on Google Spreadsheet using Google Apps Script

Gists This is a sample script for converting the values on Google Spreadsheet as unpivot (reverse pivot) using Google Apps Script. Sample script 1: const SAMPLE1 = ([[, ...header], ...values]) => header.flatMap((h, i) => values.map((t) => [h, t[0], t[i + 1]])); In the sample, the source data is “A1:D8”. And, a custom function of =SAMPLE1(A1:D8) is put into “F1”. When this script is used, the result showing the above image (most left table to middle table) is obtained.

Best Practices for Discontinuous Cells on Google Spreadsheet by Google Apps Script

Gists Abstract It has already been known that Google Apps Script is a strong tool for managing Google Spreadsheets. When the values are retrieved and/or put for Google Spreadsheet, there is a case that the discontinuous cells are required to be used. This report suggests the Best Practices for processing the discontinuous cells on Google Spreadsheet. From the results of process costs, it could understand the usefulness of using the discontinuous cells with low cost using Sheets API and Class RangeList of Spreadsheet service with Google Apps Script.