Gists
This is a sample script for updating the destination sheet by the source sheet in Google Spreadsheet using Google Apps Script.
The sample situation is as follows.
Sample script function myFunction() { const sheetNames = ["Sheet1", "Sheet2"]; // Retrieve values from source and destination sheets. const ss = SpreadsheetApp.getActiveSpreadsheet(); const [srcSheet, dstSheet] = sheetNames.map((s) => ss.getSheetByName(s)); const [srcValues, dstValues] = [srcSheet, dstSheet].map((s) => s.
Gists
This is a sample script for detecting whether the specific cells on Google Spreadsheet are manually moved using Google Apps Script.
In this case, the named range, OnChange trigger, and PropertiesService are used.
Usage: 1. Create a named range. As a sample, please create a named range to the cells “A2:B2” as “sampleNamedRange1”. Ref
2. Prepare sample script. Please copy and paste the following script to the script editor of Spreadsheet.
Gists
In this post, I would like to introduce the method for using RichTextValue with a custom function of Google Apps Script.
This sample is for this thread in Stackoverflow.
In this thread, the OP’s goal is as follows.
Put a text to a cell. In this case, use a hyperlink in a part of the text. This is required to be achieved using a custom function. In the current stage, in order to reflect the hyperlink in a part of the text, it is required to use setRichTextValue of Google Apps Script.
Gists
This is a sample script for retrieving icons of each mimeType on Google Drive using Google Apps Script.
Sample script Sample list of mimeType is from this official document.
function getIcons() { const iconSize = 256; // Pixels const mimeTypes = [ "application/vnd.google-apps.audio", "application/vnd.google-apps.document", "application/vnd.google-apps.drive-sdk", "application/vnd.google-apps.drawing", "application/vnd.google-apps.file", "application/vnd.google-apps.folder", "application/vnd.google-apps.form", "application/vnd.google-apps.fusiontable", "application/vnd.google-apps.jam", "application/vnd.google-apps.map", "application/vnd.google-apps.photo", "application/vnd.google-apps.presentation", "application/vnd.
Gists
Updated on January 25, 2024 Overview: This is a report for challenging exporting the selected cells on Spreadsheet as an image using Google Apps Script and Javascript.
Description: This report is based on this question by Max Makhrov. When I saw this question, I remembered that there are many questions for asking this in Stackoverflow. And, I thought that when this is achieved, it will be useful for the owner of this question and a lot of users.