You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Benchmark: fetchAll method in UrlFetch service for Google Apps Script
Benchmark: fetchAll method in UrlFetch service for Google Apps Script
By Google's update at January 19, 2018, fetchAll method was added to the UrlFetch service. When I saw the usage, I couldn't find the detail information about the actual running state. So I investigated about it.
As the result, it was found that the fetchAll method is worked by the asynchronous processing. The returned data is reordered by the order of requests. By this, it was also found that if you want to retrieve the data from the several URL, the process cost of UrlFetchApp.fetchAll() is much lower than that of UrlFetchApp.fetch() using for loop.
The sample scripts for server side and client side are as follows.
Sample script for server side
In this report, 5 Web Apps were used as the servers. At first, 5 standalone projects were created and the following server script was put to each project. Then, Web Apps was deployed for ea
Adding Query Parameters to URL using Google Apps Script
Adding Query Parameters to URL using Google Apps Script
Updated on February 5, 2024
This is for adding the query parameters to the URL. These scripts can be also used for Javascript. When I created an endpoint with some query parameters, I had used the scripts of various patterns every time. Today, I prepared this sample script to unify them. If this is also useful for you, I'm glad.
Replacing Text to Image for Google Document using Google Apps Script
Replacing Text to Image for Google Document using Google Apps Script
This is a sample script for replacing text to image for Google Document using Google Apps Script (GAS). There is a method for replacing text to text at Class Text of DocumentApp. But there are not methods for replacing text to image. So I created this sample script.
This is sample scripts for copying files to a specific folder in Google Drive using Google Apps Script (GAS).
Description
When the files in Google Drive are copied to a specific folder using GAS, most users will use makeCopy(destination). When the files are copied using makeCopy(), you might have already noticed that only the standalone projects cannot be copied to the specific folder. They are copied to the root folder (My Drive). Also this situation can be also seen even when "copy" of Drive API v2 and v3 is used. I think that this might be a bug. So I would like to introduce 2 sample scripts as the workaround. In the workaround, it uses Drive API.
Dynamically Updating Custom Menu of Google Spreadsheet using Google Apps Script
Dynamically Updating Custom Menu of Google Spreadsheet using Google Apps Script
This is a sample script for dynamically updating the custom menu of Google Spreadsheet using Google Apps Script.
Demo
In this demonstration, when the Spreadsheet is opened, 5 functions added to the custom menu. You can see that when a column is added and deleted, the custom menu is updated.