tanaike

The Thinker

Converting Google Spreadsheet to HTML Table using Google Apps Script

Gists This is a sample script for converting Google Spreadsheet to an HTML table using Google Apps Script. There is the case that it is required to convert a sheet in a Google Spreadsheet to an HTML table. For example, there might be a situation that a sheet in a Google Spreadsheet is sent as an email including an HTML table. And, there might be a situation in which a sheet in a Google Spreadsheet is published to an HTML page including the converted HTML table.

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.