tanaike

The Thinker

Retrieving subscriberCount of Channel from Video URLs of YouTube using Google Apps Script

Gists This is a sample script for retrieving the values of subscriberCount of the channel from the video URLs of YouTube using Google Apps Script. In this sample, the video URLs are retrieved from Spreadsheet. And, the retrieved values of subscriberCount are put to the Spreadsheet. The sample Spreadsheet is as follows. Sample script Please copy and paste the following script to the script editor of Spreadsheet. Before you use this script, please enable YouTube Data API v3 at Advanced Google services.

Splitting and Processing an Array every n length using Google Apps Script

Gists This is a sample script for splitting and processing an array every n length using Google Apps Script. When I prepare a sample script with Google Apps Script, I sometimes have the situation that it is required to split and process an array every n length. This sample script is for achieving this situation. Please set limit. This sample script splits the sample array every 3 length. When you use this script with Google Apps Script, please enable V8 runtime.

Report: Obtaining Values from GOOGLEFINANCE using Google Apps Script

Gists This is a report for obtaining the values from GOOGLEFINANCE using Google Apps Script. When I tested to retrieve the values from GOOGLEFINANCE function on Google Spreadsheet using Google Apps Script, I noticed that the values can be retrieved. When I had tested this before, I had got the value of #N/A. About retrieving the values from GOOGLEFINANCE function on Google Spreadsheet, I had known “Historical GOOGLEFINANCE data no longer accessible outside of Google Sheets”.

Reducing Image Data Size using Google Apps Script

Gists This is a sample script for reducing the image data size using Google Apps Script. You might have a situation where you might want to reduce the data size of image data using Google Apps Script. Here, using Google Apps Script, I would like to introduce a sample script for reducing the data size of the image data by reducing the image quality. Limitations In the current stage, by the specification of Google side, there are the following limitations.

Expanding Rows in Google Spreadsheet using Google Apps Script

Gists This is a sample script for expanding the rows in Google Spreadsheet using Google Apps Script. The sample situation is as follows. Sample situation Input Output Sample script function myFunction() { const expandedColumns = [2, 3, 4, 5]; // Please set the expanded columns you expect. const delimiter = "\n"; // Please set the delimiter. const srcSheetName = "Sheet1"; // Please set the source sheet name. const dstSheetName = "Sheet2"; // Please set the destination sheet name.