tanaike

The Thinker

Workaround: Retrieving Hyperlink from Cell of Number Value using Google Apps Script

Gists This is a workaround for retrieving the hyperlink from the cell of a number value using Google Apps Script. As a sample situation, it supposes that a cell “A1” has a number value like 123, and a hyperlink of https://tanaikech.github.io is set to the cell. In order to retrieve the hyperlink from the cell, it is required to use the methods of getRichTextValue() and getRichTextValues(). But, in the current stage, when the cell value is a number value, when the RichText is retrieved by getRichTextValue(), null is returned.

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.