tanaike

The Thinker

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, when I saw the HTML of finance.yahoo.com, I noticed that the data is converted by the salted base64. In order to decrypt the data, it is required to use the key data. But, unfortunately, I couldn’t find the key data from the HTML. When I searched for it, I found this thread. From the thread, I could retrieve the key data.

Encrypting and Decrypting with AES using crypto-js with Google Apps Script

Gists This is a sample script for encrypting and decrypting with AES using crypto-js with Google Apps Script. Unfortunately, in the current stage, Google Apps Script cannot encrypt and decrypt AES using the built-in functions. In this post, in order to achieve this, “crypto-js” is used from cdnjs.com ( https://cdnjs.com/libraries/crypto-js ). In the current stage, it seems that the main functions of crypto-js.min.js can be directly used with Google Apps Script.

Rearranging Columns on Google Spreadsheet using Google Apps Script

Gists This is a sample script for rearranging columns on Google Spreadsheet using Google Apps Script. Sample script In this sample script, the initial columns of “header1”, “header2”, “header3”, “header4” and “header5” are rearranged to “header2”, “header5”, “header1”, “header4”, “header3”. This result can be seen at the above image. As an important point, in this script, the header titles in the 1st row are used. Please be careful about this.

Retrieving Values from Publicly Shared Google Spreadsheet using API key with Javascript

Gsits This is a sample script for retrieving the values from a publicly shared Google Spreadsheet using an API key with Javascript. Sample script In this sample script, googleapis for Javascript is used. <script async defer src="https://apis.google.com/js/api.js" onload="handleClientLoad()"></script> <script> function handleClientLoad() { const apiKey = "###"; // Please set your API key. const spreadsheetId = "###"; // Please set your Spreadsheet ID. gapi.load('client', async () => { await gapi.

Copying and Deleting Dimension Groups in Google Spreadsheet using Google Apps Script

Gists In this post, I would like to introduce 2 sample scripts for copying and deleting the dimension groups in Google Spreadsheet using Google Apps Script. Unfortunately, in the current stage, all dimension groups cannot be copied by one action, and also, all dimension groups cannot be deleted by one action. In this post, these can be achieved using Google Apps Script. These sample scripts use Sheets API. So, please enable Sheets API at Advanced Google services.