tanaike

The Thinker

Using OnEdit Trigger to Google Spreadsheet by Hiding Google Apps Script from Other Users

Gists This is a method for using OnEdit Trigger to Google Spreadsheet by hiding Google Apps Script from other users. A sample flow for achieving this is as follows. Flow 1. Create a new Google Spreadsheet. Please create a new Google Spreadsheet. In this flow, this Google Spreadsheet is used for testing the script. And, please copy the Spreadsheet ID. This spreadsheet ID is used. In this case, even when Spreadsheet has no container-bound script, this goal can be achieved.

Replacing U+00A0 with U+0020 as Unicode using Google Apps Script

Gists This is a sample script for checking and replacing a character of U+00A0 (no-break space) with U+0020 (space) as Unicode using Google Apps Script. When I’m seeing the questions on Stackoverflow, I sometimes saw the situation that the script doesn’t work while the script is correct. In this case, there is the case that the reason is due to U+00A0 being used as the spaces. When U+00A0 is used as the spaces, Google Apps Script and formulas cannot be correctly run.

Set Line Space of Paragraph on Google Document using Google Apps Script

Gists This is a sample script for setting the line space of paragraphs on Google Documents using Google Apps Script. When the line space of a paragraph on Google Documents is manually set, you can do it as follows. When it is set with Google Apps Script, the following script can be used. function sample1() { const doc = DocumentApp.getActiveDocument(); const body = doc.getBody(); const paragraph = body.

Opening and Closing Google Forms on Time using Google Apps Script

Gists This is a sample script for opening and closing Google Forms on time using Google Apps Script. In order to test this sample script, please do the following flow. Usage 1. Create a new Google Form. Please create a new Google Form and set your sample questions. And, please open the script editor of Google Form. 2. Prepare sample script. Please copy and paste the following script to the script editor of Google Form.

Decrypting Salted Base64 of finance.yahoo.com using Google Apps Script

Gists This sample script decrypts the salted base64 data of finance.yahoo.com using Google Apps Script. Recently, it seems that the specification of the key for decrypting the data has been changed at the server side. So. in this post, this post is updated. About this specification, I checked this thread. Sample script function myFunction() { // Load crypto-js.min.js. const cdnjs = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"; eval(UrlFetchApp.fetch(cdnjs).getContentText()); // Retrieve HTML and retrieve salted base64.