Gists
This is a sample script for removing the invalid named range of #REF from Google Spreadsheet using Google Apps Script.
Issue and workaround For example, there are 2 sheets of “Sheet1” and “Sheet2” in a Google Spreadsheet. A new named range of sample is created for the range of Sheet1!A1, and remove the sheet of “Sheet1”. By this flow, when the named range list is checked by UI on Spreadsheet, sample has #REF.
Gists
This is a sample script for converting A1Notation to GridRange and vice versa using Google Apps Script without any scopes.
A1Notation and GridRange are often used with Sheets API. I have posted a sample script for converting A1Notation to GridRange before. Ref But, in that case, I used the method of Spreadsheet service (SpreadsheetApp). By this, in order to use the script, it is required to authorize the scopes. In this sample script, A1Notation can be converted to GridRange and vice versa with no scopes.
Gists
This is a sample script for shortening a long URL using Firebase Dynamic Links API with Google Apps Script.
IMPORTANT Before you use this script, please create a new Firebase project and link it to your Google Cloud Platform Project. Ref And, please enable Firebase Dynamic Links API at the API console. And then, please create your API key from your Google Cloud Platform Project.
Sample script const apiKey = "###"; // Please set your API key.
Gists
This is a sample script for protecting the cells of a Spreadsheet by clicking a checkbox using Google Apps Script.
You might have a situation where you want to protect the cells when a user checks a checkbox. This sample script is for achieving this situation. The demonstration of this sample script is as follows.
This demonstration is for a user. You can see that when the checkbox is checked, the checkbox and the right side of the checkbox are protected.
Gists
This is a sample flow for parsing XML data in Google Apps Script using IMPORTXML. Recently, it seems that ContentService.MimeType.XML has been removed by the Google side. By this, in the current stage, the XML data cannot be directly loaded by the Web Apps URL with IMPORTXML. From this current situation, I would like to introduce a workaround. In this workaround, the XML data in Google Apps Script is parsed by IMPORTXML of the built-in function of Google Spreadsheet.