tanaike

The Thinker

January 27, 2023: 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. from this script, I updated the script as follows. 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.

Using OnEdit trigger on Google Spreadsheet Created by Service Account

Gists In the current stage, by the current specification, Google Apps Script cannot be directly run on Google Spreadsheet created by Service Account. But, there is a case in that we want to use the OnEdit trigger on the Spreadsheet that the service account is the owner. In this post, I would like to introduce the method for achieving this. Recently, I published “Using OnEdit Trigger to Google Spreadsheet by Hiding Google Apps Script from Other Users”.

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.