tanaike

The Thinker

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.

Workaround: Reflecting Latest Script to Deployed Web Apps Created by Google Apps Script without Redeploying

Gists This report is a workaround for reflecting the latest Google Apps Script to the deployed Web Apps without redeploying. Pattern 1 Of course, when the developer mode of https://script.google.com/macros/s/###/dev is used, the latest script can be used without redeploying. But, in this case, only the permitted users can use it using the access token. when you want to achieve this using the endpoint of https://script.google.com/macros/s/###/exec without the access token, in order to reflect the latest script to Web Apps, it is required to redeploy.