tanaike

The Thinker

Simply Converting HTML to Plain Text using Google Apps Script

Gists This is a sample script for simply converting HTML to plain text using Google Apps Script. Sample values HTML (input value) <div id="sample1">sample text1</div> <div id="sample2">sample text2</div> <ul id="sample3"> <li>sample list 1</li> <li>sample list 2</li> </ul> <table id="sample4"> <tbody> <tr> <td>a1</td> <td>b1</td> <td>c1</td> </tr> <tr> <td>a2</td> <td>b2</td> <td>c2</td> </tr> </tbody> </table> Text (output value) sample text1 sample text2 - sample list 1 - sample list 2 a1 b1 c1 a2 b2 c2 Sample script function myFunction() { const sampleHTML = `<div id="sample1">sample text1</div> <div id="sample2">sample text2</div> <ul id="sample3"> <li>sample list 1</li> <li>sample list 2</li> </ul> <table id="sample4"> <tbody> <tr> <td>a1</td> <td>b1</td> <td>c1</td> </tr> <tr> <td>a2</td> <td>b2</td> <td>c2</td> </tr> </tbody> </table>`; const temp = GmailApp.

Merging Rows with Same Header Title in Google Spreadsheet using Google Apps Script

Gists This is a sample Google Apps Script for processing the values in Google Spreadsheet. In this sample situation, each row is merged using the same header title. In this sample script, the sample input and output situations are as follows. Sample situation Input: Output: Sample script In this sample script, this sample can be used as the custom function. function SAMPLE(values) { const headers = [ ...new Set( values .

Updating Script Editor of Google Apps Script

On April 13, 2022, “Additional functionality for the Apps Script Integrated Development Environment (IDE) Script Editor” has been reported. They say as follows. We’re now adding several new features to the IDE to help achieve functional parity with the legacy IDE experience. These features are: Script Properties Add-on Testing Time Zone Setting Rhino Debugging By this update, I believe that the script editor will be more useful.

Creating Quizzes in Google Form using Google Forms Service with Google Apps Script

Gists This is a sample script for creating quizzes in Google Form using Google Forms Service with Google Apps Script. Usage 1. Prepare questions and answers. In this sample, the questions and answers are prepared using Spreadsheet as follows. 2. Sample script. This script is container-bound script of the above Spreadsheet. function myFunction() { const formTitle = "sample"; // This is a form title. const sheetName = "Sheet1"; // This is a sheet name.

Creating Quizzes in Google Form using Google Forms API with Google Apps Script

Gists This is a sample script for creating quizzes in Google Form using Google Forms API with Google Apps Script. Recently, Google Forms API has been officially published, and it got to be able to be used by users. By this, quizzes in Google Form can be created using Google Forms API. Here, there is one thing that can be achieved by Google Forms API. When Google Forms API is used, each choice in each question can be shuffled.