Report

Recursive Knowledge Crystallization: A Framework for Persistent Autonomous Agent Self-Evolution

Gists

fig1a

Abstract

In the development of autonomous agents using Large Language Models (LLMs), restrictions such as context window limits and session fragmentation pose significant barriers to the long-term accumulation of knowledge. This study proposes a “self-evolving framework” where an agent continuously records and refines its operational guidelines and technical knowledge—referred to as its SKILL—directly onto a local filesystem in a universally readable format (Markdown). By conducting experiments across two distinct environments featuring opaque constraints and complex legacy server rules using Google’s Antigravity and Gemini CLI, we demonstrate the efficacy of this framework. Our findings reveal that the agent effectively evolves its SKILL through iterative cycles of trial and error, ultimately saturating its learning. Furthermore, by transferring this evolved SKILL to a completely clean environment, we verify that the agent can successfully implement complete, flawless client applications in a single attempt (zero-shot generation). This methodology not only circumvents the limitations of short-term memory dependency but also pioneers a new paradigm for cross-environment knowledge portability and automated system analysis.

StackOverflow Trends 2026: The Structural Shift from Human Support to Generative AI

Gists

Published: January 3, 2026

Author: Kanshi Tanaike

Abstract

Analyzing StackOverflow data (2008–2026) reveals a massive activity decline post-ChatGPT. Using Google Apps Script as a case study, this report quantifies the migration from human support to AI. We explore how the platform is pivoting from a help desk to a critical verification layer for AI-generated code to prevent model collapse.

Introduction

On StackOverflow, millions of developers engage in daily knowledge exchange, creating a historical repository of technological evolution. A prime example of this ecosystem is the google-apps-script tag. Having participated in this community for years, I have observed its threads evolve in tandem with Google’s platform updates.

Statistics of my Activities from 2025-01-01 - 2025-12-31 on Stackoverflow

URL: https://stackoverflow.com/users/7108653/tanaike?tab=answers&sort=newest

This is the statistics of my activities from 2025-01-01 - 2025-12-31 on Stackoverflow.

  • Answers to stackoverflow

    • I answered 35 answers.
    • On January 02, 2026, the total view count is 7,795.
  • Answers to ja.stackoverflow

    • I answered 1 answers.
    • On January 02, 2026, the total view count is 292.

Total view counts: 8,087

Major Update: Taking Advantage of Web Apps with Google Apps Script

Description

I am thrilled to announce a significant update to the Taking Advantage of Web Apps with Google Apps Script repository! Now at Version 2.0.0, this comprehensive guide has been extensively revised and expanded to provide unparalleled insights and practical guidance for developers leveraging Google Apps Script Web Apps.

This major overhaul introduces a wealth of new and enhanced content, designed to empower you with a deeper understanding and more advanced capabilities.

Importance of Time Information in Gemini and Current Time Handling

Gists

Abstract

This report investigates how Gemini handles current time information, particularly when using the Gemini API. We found that while the Gemini web interface knows the current time, the Gemini API does not inherently. Therefore, applications must explicitly provide current time information in API calls for accurate time-sensitive responses.

Introduction

The rapidly advancing field of generative AI is enabling increasingly complex tasks, particularly through the use of open protocols like the Model Context Protocol (MCP) and Agent2Agent (A2A) Protocol. These protocols facilitate sophisticated operations that often require accurate and dynamic information, including time-sensitive data. For instance, applications that manage schedules or coordinate events critically depend on precise time information.

Analyzing Google Apps Script from Stackoverflow

Gists

Abstract

The report details a novel Gemini API method to analyze big data beyond AI context window limits, which was validated with Stack Overflow data for insights into Google Apps Script’s potential.

Introduction

Generative AI models face significant limitations when processing massive datasets, primarily due to the constraints imposed by their fixed context windows. Current methods thus struggle to analyze the entirety of big data within a single API call, preventing comprehensive analysis. To address this challenge, I have developed and published a detailed report presenting a novel approach using the Gemini API for comprehensive big data analysis, designed to operate effectively beyond typical model context window limits. Ref

Comprehensive Big Data Processing with Gemini

Gists

Abstract

Generative AI faces limits in processing massive datasets due to context windows. Current methods can’t analyze entire data lakes. This report presents a Gemini API approach for comprehensive big data analysis beyond typical model limits.

Introduction

The rapid advancement and widespread adoption of generative AI have been remarkable. High expectations are placed on these technologies, particularly regarding processing speed and the capacity to handle vast amounts of data. While AI processing speed continues to increase with technological progress, effectively managing and analyzing truly large datasets presents significant challenges. The current practical limits on the amount of data that can be processed or held within a model’s context window simultaneously, sometimes around a million tokens or less, depending on the model and task, restrict direct comprehensive analysis of massive data lakes.

Trend of google-apps-script Tag on Stackoverflow 2025

Gists

Published: March 9, 2025

Kanshi Tanaike

Introduction

On Stack Overflow, numerous users post questions and answers daily across various tags. These discussions, spanning a wide range of topics, provide valuable information and are highly beneficial. One such tag is “google-apps-script,” where I occasionally participate in discussions. Observing these threads over time, it’s evident that they evolve alongside updates to Google Apps Script, the technology at the core of the tag. This report aims to analyze this evolution as a trend within the “google-apps-script” tag. This trend encompasses changes in the number of questions, questioners, answerers, and associated tags. The evolution of the “google-apps-script” tag is closely linked to the development of Google Apps Script and its diverse applications.

Statistics of my Activities from 2024-01-01 - 2024-12-31 on Stackoverflow

URL: https://stackoverflow.com/users/7108653/tanaike?tab=answers&sort=newest

This is the statistics of my activities from 2024-01-01 - 2024-12-31 on Stackoverflow.

  • Answers to stackoverflow

    • I answered 380 answers.
    • On March 02, 2025, the total view count is 182,695.
  • Answers to ja.stackoverflow

    • I answered 2 answers.
    • On March 02, 2025, the total view count is 3,409.

Total view counts: 186,104

Creating Dining Reservation System using Google Apps Script

Gists

Abstract

Google Apps Script automates tasks (even offline) and builds web apps using spreadsheets as databases. This report presents a basic dining reservation system to illustrate key aspects of web app development with Apps Script, HTML, and Javascript.

Introduction

Google Apps Script is one of the powerful automation tools for achieving the automation process. When Google Apps Script can be used for the situation, even when users are away from their computers, automation can continue thanks to cloud computing. Also, Google Apps Script can manage Google Spreadsheet with Google Spreadsheet service and quickly deploy Web Apps with HTML and Javascript with minimal coding. Ref1 Ref2 When Google Spreadsheet is used as a database and the Web Apps are used as the user interface, various web applications can be created. In this report, in order to help understand the key aspects of building web applications with Google Apps Script, I would like to introduce a simple web application. Here, as a sample, the dining reservation system created by Google Apps Script, HTML, and Javascript is implemented as a web application.

Report: How to Run Google Apps Script

Gists

Abstract

Google Apps Script is one of the strong tools with cloud computing, and it is very useful for various situations. Google Apps Script can be run by various methods. This report introduces how to execute Google Apps Script.

Recently, generative AI has given a lot of new users a chance to use Google Apps Script. If this report helps the users develop applications using Google Apps Script, I’m glad.

Trend of google-apps-script Tag on Stackoverflow 2024

Gists

Published: January 6, 2024

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring important information and are very useful for a lot of people. As one of the tags, there is “google-apps-script”. I sometimes discuss the questions with that tag. When we see the discussions, we notice that the discussions have changed and progressed over time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change is the trend of the tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers, and tags added to the tag of “google-apps-script”. The trend of the tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Workaround: Making Users Edit Protected Cells using Google Apps Script

Gists

Abstract

One day, you might have a situation where you are required to make users edit the protected cells using Google Apps Script. This report introduces a workaround for achieving this situation. The key factors for achieving this are as follows. 1. Run the script as the owner of Spreadsheet even when the script is run by a user. 2. In order to run the script as the owner, the installable triggers and the Web Apps are used.

Technique of Array Processing for Custom Functions on Google Spreadsheet using Google Apps Script

Gists

Description

At Google Spreadsheet, custom functions created by Google Apps Script can be used. Ref When the custom function is used, the users can create a function for expanding the built-in functions for Spreadsheet. One day, you might have a situation for executing the custom function using an array. For example, under the situation that your custom function uses a single value instead of an array as the argument, when you want to use an array for each argument of the custom function, it is required to modify the original script of the custom function or the function calling the custom function. In this report, I would like to introduce a technique of array processing for the custom functions on Google Spreadsheets.

Technique for Processing Google Spreadsheet Including Merged Cells using Google Apps Script

Gists

Description

At Google Spreadsheet, the cells can be merged as one cell. But, when the Spreadsheet including the merged cells is used with Google Apps Script, the script becomes a bit complicated. Also, I sometimes find some questions like this situation on Stackoverflow. In this report, I would like to introduce a technique for easily using the Spreadsheet including the merged cells with Google Apps Script.

Principle

Before it introduces the sample scripts, I would like to introduce the principle for using the Spreadsheet for the merged cells. You can understand the principle of this method from the following sample input and output images.

Workaround: Detecting Change of IMPORTRANGE using OnEdit trigger with Google Apps Script

Gists

Abstract

One day, you might have a situation where you are required to update a sheet using Google Apps Script when the cell values retrieved by IMPORTRANGE are changed. This report introduces a workaround for achieving this situation.

Introduction

Google Apps Script can be executed by several triggers. Ref When a cell in a Google Spreadsheet is manually edited, a function of Google Apps Script can be executed by detecting this edit. In most cases, the OnEdit trigger trigger of the simple trigger or the installable trigger is used. When the OnEdit trigger is used, a function can be executed by manually editing a cell. When the function is executed, the function can be run by giving the event object including the information about the edited cell.

Report: Values to transfer between Javascript and Google Apps Script with google.script.run

Gists

At the Google Apps Script project, the values can be transferred from HTML to Google Apps Script using google.script.run with Javascript. In this case, unfortunately, the values of all types cannot be transferred. In the official document, it says as follows. Ref

Most types are legal, but not Date, Function, or DOM element besides form; see description

Legal parameters are JavaScript primitives like a Number, Boolean, String, or null, as well as JavaScript objects and arrays that are composed of primitives, objects, and arrays. A form element within the page is also legal as a parameter, but it must be the function’s only parameter. Requests fail if you attempt to pass a Date, Function, DOM element besides a form, or other prohibited type, including prohibited types inside objects or arrays. Objects that create circular references will also fail, and undefined fields within arrays become null. Note that an object passed to the server becomes a copy of the original. If a server function receives an object and changes its properties, the properties on the client are not affected.

Trend of google-apps-script Tag on Stackoverflow in first half of 2023

Gists

Abstract

Recently, I felt a change like never before in the questions on Stackoverflow. In order to confirm this, in this report, the trend of “google-apps-script” tag on Stackoverflow in the first half (January 1st to June 1st) of 2023 has been investigated. From this report, in 2023 when the affection of COVID-19 has been reduced socially, the appreciable trend was confirmed to the questions including a tag of “google-apps-script”. It is guessed that the origin of this appreciable trend is due to AI chatbots. The appearance of AI chatbots might give us a phase of major change to the method for understanding the statistical data obtained from online sites.

Report: Easily Implementing HTML Form with Google Spreadsheet as Database using Google Apps Script

Gists

Abstract

This report introduces the method for easily implementing HTML forms with a Google Spreadsheet as a database using Google Apps Script. There are 2 patterns for the HTML form using Google Apps Script. One is that an HTML form is put into the same Google Apps Script project. Another is that an HTML form is put to a different server from a Google Apps Script project. In this report, the methods for easily implementing both patterns are introduced using the sample scripts.

Report: Specification of Properties Service for Google Apps Script

Gists

Abstract

In this report, the detailed specification of PropertiesService has been investigated. It is considered that knowing this specification will be useful for developing applications with Google Apps Script. As a result, it was found that the maximum key and value sizes are 524,287 bytes with a 1-byte key and 8,066 bytes, respectively. And also, it was found that the maximum size of PropertiesService is required to be considered with both the key and value sizes.

Best Practices for Discontinuous Cells on Google Spreadsheet by Google Apps Script

Gists

Abstract

It has already been known that Google Apps Script is a strong tool for managing Google Spreadsheets. When the values are retrieved and/or put for Google Spreadsheet, there is a case that the discontinuous cells are required to be used. This report suggests the Best Practices for processing the discontinuous cells on Google Spreadsheet. From the results of process costs, it could understand the usefulness of using the discontinuous cells with low cost using Sheets API and Class RangeList of Spreadsheet service with Google Apps Script.

Benchmark: Process Costs for Searching Value using Object with Google Apps Script

Gists

When a value is searched from the 1-dimensional array and a 2-dimensional array, after V8 runtime could be used, I use JSON object, Set object, and Map Object. But, I had never measured the process cost of this situation. In this post, I would like to introduce the process cost for searching a value using a JSON object, Set object, and Map object converted from the 1-dimensional array and 2-dimensional array.

Trend of google-apps-script Tag on Stackoverflow 2023

Gists

Published: January 3, 2023

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring important information and are much useful for a lot of people. As one of the tags, there is “google-apps-script”. I sometimes discuss the questions with that tag. When we see the discussions, we can notice that the discussions are changed and progressed over time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change is the trend of the tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers, and tags added to the tag of “google-apps-script”. The trend of the tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Report: Implementing Pseudo 2FA for Web Apps using Google Apps Script

Gists

Abstract

In Google Apps Script, there is the Web Apps. When Web Apps is used, the users can execute Google Apps Script using HTML and Javascript. This can be applied to various applications. When the Web Apps is deployed with “Anyone”, anyone can access the Web Apps. And, there is the case that Web Apps deployed with “Anyone” is required to be used. Under this condition, when 2 Factor Authentication (2FA) can be implemented, it is considered that the security can be higher and it leads to giving various directions for the applications using Web Apps. In this report, I would like to introduce the method for implementing the pseud 2FA for Web Apps deployed with “Anyone” using Google Apps Script.

Benchmark: Process Costs for Checking Value in Array using Google Apps Script

Gists

Kanshi Tanaike

Introduction

There is a maximum executing time for Google Apps Script (GAS). That is 6 minutes. And, in the case of the custom function and the simple trigger, it is 30 seconds. Ref So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process costs for the array processing, because array processing is often used for spreadsheets and Google APIs. I have already reported about the array processing at “Benchmark: Loop for Array Processing using Google Apps Script with V8” and “Search for Array Processing using Google Apps Script”. In this report, the process cost checking a value in a one-dimensional array using Google Apps Script has been investigated.

Report: Rule of Item IDs for Questions of Google Forms

Gists

This is a report related to the rule of item IDs for questions of Google Forms.

When the questions are created using the method of batchUpdate with Google Forms API, the created questions have the item IDs when the item IDs are not given in the request body. ( https://developers.google.com/forms/api/reference/rest/v1/forms#item ) For example, when you want to create a question and update the created question in one API call, it is required to include the custom item ID in the request body. But, it seems that in the current stage, the information of the item ID has never been published. So, in this report, I would like to consider the rule of item IDs of questions for Google Forms API.

Report: Process Cost of Google Apps Script During Large Calculations by Formulas on Google Spreadsheet

Gists

Today, I found a question ( https://stackoverflow.com/q/73540735 ) in Stackoverflow by Max Makhrov. When I saw this question, I thought that this is a good raising question. In this question, it has reported that when the Spreadsheet includes the formulas of the large calculation, when a Google Apps Script is run during the calculation of the formulas is running, the processing time of the script becomes long.

I have also experienced this before. And, in that time, I noticed that there are differences in process costs for the methods of Google Apps Script under this condition.

Report: Efficiently Creating Web Apps using a Google Apps Script library

Gists

This is a sample script for efficiently creating Web Apps using a Google Apps Script library.

When a Google Apps Script library is used for creating Web Apps, the following advantage can be obtained.

  • The script of the client-side can be simpler. Because most scripts for constructing Web Apps are included in the Google Apps Script library.
  • When the script of Web Apps (In this case, the script of Google Apps Script library is modified.) is modified, the latest script is reflected in the Web Apps, immediately. Because when the Google Apps Script library is used as the latest version when the script of the library is modified, the client can use the latest script of the library, immediately. So, the downtime of Web Apps can be reduced.
    • By this, it is not required to manually reflect the latest version of the script to the Web Apps.
  • When you can change the script of Web Apps by changing the deployed version of the library.

The sample script for explaining this is as follows.

Benchmark: High-Efficiency Finding and Replacing Many Values in Google Spreadsheet with Low Process Cost using Google Apps Script

Gists

This is a sample script for high-efficiency finding and replacing many values in Google Spreadsheet with the low process cost using Google Apps Script.

When the various values are replaced in Google Spreadsheet using Google Apps Script, I’m worried about the process cost. So, in this report, I would like to introduce a sample script for high-efficiency achieving this.

As the result, using a sample situation, when the process cost of the sample script using Sheets API is compared with that of the sample script using Spreadsheet services (SpreadsheetApp), it was found that the above script using Sheets API could reduce the process cost by about 70 % from the script using Spreadsheet service.

Report: Challenging Exporting Selected Cells on Spreadsheet as Image using Google Apps Script and Javascript

Gists

Updated on January 25, 2024

Overview:

This is a report for challenging exporting the selected cells on Spreadsheet as an image using Google Apps Script and Javascript.

Description:

This report is based on this question by Max Makhrov. When I saw this question, I remembered that there are many questions for asking this in Stackoverflow. And, I thought that when this is achieved, it will be useful for the owner of this question and a lot of users. So, I have discussed this in his question.

Report: Management of Images on Google Spreadsheet using Google Apps Script

Gists

This is a report for management of images on Google Spreadsheet using Google Apps Script.

At October 30, 2018, Cass OverGridImage and the method of inserImage have been added to Spreadsheet Service. Ref At January 19, 2022, Class CellImageBuilder and Class CellImage have been added to Spreadsheet Service. Ref By these Classes and methods, the images got to be able to be managed on Google Spreadsheet. But, when the image is used to the various situations, there are the cases that it is required to ingenuity to manage the images. So, in this report, I would like to introduce the management of images on Google Spreadsheet using the sample scripts of Google Apps Script.

Report: Documentation Comments including JsDoc for Functions of Google Apps Script

Gists

This is a report for the documentation comments for the functions of Google Apps Script.

When the documentation comments for functions of Google Apps Script are considered, you will think JsDoc. At Google Apps Script, a part of JsDoc can be used. But, in this report, I would like to introduce the documentation comments including JsDoc.

Sample situations

Sample 1

For example, when the following sample function is written,

Benchmark: Process cost for Parsing XML data using Google Apps Script

Gists

Introduction

In order to retrieve the values from XML data, when XML data is parsed using Google Apps Script, there are several methods for parsing the data. Class XmlService, which is a built-in Class for managing XML data, might be the first way to come up with it. At Stackoverflow, it is posted questions that XML data is often parsed using Class XmlService. It is considered that Class XmlService is suitable for managing XML data.

Benchmark: Process cost for HTML Template using Google Apps Script

Gists

Introduction

When we use HTML in the Google Apps Script project, in order to show the values from the Google Apps Script side, the HTML template is used. When I used the HTML template with a large value, I understood that the process cost can be reduced by devising a script. In this report, I would like to introduce the process cost of the HTML template using the benchmark.

Report: Publishing Various Google Docs with Same URL using Google Apps Script

Gists

This is a sample method for publishing various Google Docs files with the same URL using Google Apps Script.

By updating on May 25, 2022, the content got to be able to be embedded as a full page in the new Google site. Ref In this method, this is used.

Usage

1. Create a Google Docs.

First, as a simple sample, please create a new Google Spreadsheet. And please copy the URL like https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit.

Report: Handling 10,000,000 cells in Google Spreadsheet using Google Apps Script

Gists

Introduction

On March 14, 2022, it reported about “Google Sheets doubles cell limit”. Ref By this update, now, the users can use 10,000,000 cells in a Google Spreadsheet. This is great news for us. When I tried to handle 10,000,000 cells in a Google Spreadsheet using Google Apps Script, it was found that there were various important points. In this report, I would like to introduce the important points for handling 10,000,000 cells in Google Spreadsheet using Google Apps Script.

Applicating Spread Syntax and Destructuring assignment to Google Spreadsheet with Google Apps Script

Gists

Introduction

In this report, I would like to introduce to apply the spread syntax and the destructuring assignment to Google Spreadsheet with Google Apps Script. The destructuring assignment can be used without V8 runtime. But, the spread syntax is required to be used with V8 runtime. Recently, I often saw the script using them at Stackoverflow. And also, I have sometimes gotten the questions related to the spread syntax and the destructuring assignment. So, I thought that I would like to introduce in my blog.

Report: Occurring and Resolving Infinite Loop on Google Spreadsheet using Google Apps Script

Gists

Here, I would like to introduce a report for occurring and resolving the infinite loop on Google Spreadsheet using Google Apps Script. I have reported this to Google issue tracker. Ref

Sample script: Occurring infinite loop

This sample script is a test script for confirming the infinite loop. Please be careful this. Please copy and paste the following script to the script editor of Google Spreadsheet and save it. And, please install OnChange trigger to the function onChange().

Report: Inserting Multiple Paragraphs to Google Document in Order using Google Docs API

Gists

This is a report for inserting the multiple paragraphs to Google Document in order using Google Docs API.

When the multiple paragraphs are inserted to Google Document using Google Docs API, it is required to pay attention to the index for inserting the texts. In this report, I would like to introduce the points for achieving this with a simple method.

Although this report uses Google Apps Script, the logic of this method can be used for other language.

Trend of google-apps-script Tag on Stackoverflow 2022

Gists

Published: January 7, 2022

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post the questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring important information and are much useful for a lot of people. As one of the tags, there is “google-apps-script”. I sometimes discuss the questions with that tag. When we see the discussions, we can notice that the discussions are changed and progressed by the time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change is the trend of the tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers, and tags adding to the tag of “google-apps-script”. The trend of the tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Report: Images put with IMAGE function on Google Spreadsheet

Gists

This is a report about images put with “=IMAGE(IMAGE_URL)” function on Google Spreadsheet.

Experiment

When “=IMAGE(IMAGE_URL)” is put to a cell “A1” on Spreadsheet, the image is shown in the cell as shown in the following image.

For this situation, when the following script is run,

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
const range = sheet.getRange("A1");
range.copyTo(range, { contentsOnly: true });

The following result is obtained. In this case, the formula is removed and an image can be seen as shown in the following image.

Large Decimal Numbers and Exponential Notation for Google Spreadsheet

Gists

In this report, it has investigated the large decimal numbers and the exponential notation for Google Spreadsheet. When the large decimal numbers are put to the Spreadsheet, the Spreadsheet automatically sets the display value using the exponential notation. In this report, the result when the values are retrieved by Spreadsheet service and Sheets API is shown.

Sample script

At first, please create new Spreadsheet and open the script editor. And please copy and paste the following script. And, please enable Sheets API at Advanced Google services.

Benchmark: Concurrent Writing to Google Spreadsheet using Form

Gists

  • Published: September 15, 2021

  • Updated: September 17, 2021

    • From the discussions, added data by changing the wait time of LockService for Web Apps.

Kanshi Tanaike

Introduction

When the users try to write to a Spreadsheet using a form, the developers have to consider the concurrent submission from the form. For example, when multiple users submit the data with the form simultaneously, all data are possibly not to be saved to the Spreadsheet. So it is considered that it is important to know the information about the concurrent writing to Google Spreadsheet using a form. In this report, such a situation was investigated.

Benchmark: Process Costs for Retrieving 1st Empty Cell and 1st Non Empty Cell of Specific Column in Google Spreadsheet using Google Apps Script

Gists

Introduction

Here, I would like to report the process costs for retrieving the 1st empty cell or 1st non empty cell of the specific column of Google Spreadsheet using Google Apps Script (GAS). For this situations, the following 2 patterns can be considered.

  1. Retrieving 1st empty cell of specific column by searching from TOP of sheet

  2. Retrieving 1st NON empty cell of specific column by searching from BOTTOM of sheet

Trend of google-apps-script Tag on Stackoverflow 2021

Gists

Published: January 16, 2021

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post the questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring the important information and are much useful for a lot of people. As one of tags, there is “google-apps-script”. I sometimes discuss at the questions with that tag. When we see the discussions, we can notice that the discussions are changed and progressed by the time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change as the trend of tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers and tags adding to the tag of “google-apps-script”. The trend of tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Benchmark: Measuring Process Costs for Formulas in Cells on Google Spreadsheet using Google Apps Script

Gists

Description

When Google Spreadsheet is used, there is the case that the built-in functions and the custom functions in the cells are used. For the functions of Google Apps Script, there is the method for measuring the process cost. Ref But for the built-in functions, it is required to create the script for it. In this report, the script for measuring a function put in a cell has been proposed, and the process cost of the built-in functions has been measured. The proposed script can measure the process cost for the built-in functions and custom functions on Google Spreadsheet. The script is created with using Google Apps Script. When the process cost can be known for the built-in functions and custom functions, it is considered that it will be useful for the developers using Google Spreadsheet.

Benchmark: Process Costs for Retrieving Values from Arrays for Spreadsheet using Google Apps Script

Gists

Introduction

Here, I would like to report the process costs for retrieving the values from the arrays for Spreadsheet using Google Apps Script (GAS). When Spreadsheet is used with Google Apps Script, we have the following situations.

  1. Retrieve values from the multiple rows in a column.

  2. Retrieve values from the multiple columns in a row.

When the values are retrieved from above situations, it is required to retrieve the values from 1 dimensional array in the 2 dimensional array. In this report, the process costs for retrieving the values from the 2 dimensional array of above situations have been measured.

Statistical Analysis of Duplicated Questions for google-apps-script tag in Stackoverflow

Gists

Introduction

At Stackoverflow, a lot of people post the questions and answer to the questions every day. By this, there are a lot of important information in Stackoverflow. I have already reported “Trend of google-apps-script Tag on Stackoverflow” using the data retrieved from Stackoverflow. Ref. 1 It is found that the important statistical result can be obtained by analyzing the data on Stackoverflow. In this report, I would like to introduce the statistical analysis of duplicated questions for the google-apps-script tag in Stackoverflow. When the duplicated question is analyzed, it is considered that the important issues for users can be known. As the result, it was found that there are the trend that the duplicated questions related to Javascript, Google Spreadsheet , the process cost and the cooperation with HTML and Javascript are posted.

Benchmark: Process Costs for Searching Values in Spreadsheet using Google Apps Script

Gists

Introduction

Here, I would like to report the process costs for searching values in Spreadsheet using Google Apps Script (GAS). When the values are searched in Google Spreadsheet, the following 3 patterns can be considered. Ref

  1. Retrieve all values using getValues, and the values are searched from the retrieved array.
  2. Use TextFinder.
  3. Use Query language.

In these cases, it has already been found that the lowest process cost is to use the Query language. And about finding values from an array, I have already been reported as “Benchmark: Search for Array Processing using Google Apps Script”. But I had never summarized the process costs for TextFinder and find values from an array. So in this report, I would like to introduce this. As the result, the importance of TextFinder for retrieving the row numbers and the row values by searching a value could be understand.

Tags Using Together with google-apps-script Tag at Stackoverflow

Gists

This table shows all tags using together with the tag of “google-apps-script” at Stackoverflow. The tags are summarized every year. At 2020, the data is retrieved from January 1, 2020 to July 16, 2020. The number enclosed (###) means the number of use of the tag. When this table was a material for discussing about the current tags for “google-apps-script”, I’m glad.

Year Used Tag list
2008
2009 google-form(1),google-sheets(1),google-apps-script(1)
2010 google-apps-script(50),google-sheets(31),javascript(23),google-apps(4),custom-function(2),google-calendar-api(2),spreadsheet(2),google-docs-api(2),vba(2),google-docs(2),amazon(1),amazon-web-services(1),api(1),timezone(1),ms-office(1),xml-namespaces(1),xml(1),closures(1),google-sites(1),google-maps-api-3(1),array-formulas(1),google-sheets-formula(1),google-data-api(1),date-manipulation(1),datetime(1)
2011 google-apps-script(72),google-sheets(31),google-apps(16),javascript(15),google-docs(8),google-spreadsheet-api(4),google-form(3),google-api(3),google-docs-api(2),spreadsheet(2),google-fusion-tables(2),google-calendar-api(2),java(2),google-app-engine(2),number-formatting(1),file-upload(1),google-apps-marketplace(1),json(1),email(1),html(1),tabpanel(1),gmail(1),performance(1),user-interface(1),zend-framework(1)
2012 google-apps-script(1877),google-sheets(345),javascript(161),google-docs(63),google-sites(61),google-apps(54),google-spreadsheet-api(44),google-drive-api(44),gmail(40),google-calendar-api(31),google-docs-api(29),html(19),google-visualization(18),triggers(18),email(15),google-form(15),spreadsheet(14),urlfetch(13),gwt(13),oauth(13),custom-function(13),google-app-engine(12),user-interface(11),jquery(11),jdbc(10)
2013 google-apps-script(2606),google-sheets(765),javascript(413),google-drive-api(124),google-docs(120),google-form(97),google-spreadsheet-api(78),google-apps(77),gmail(58),google-sites(57),html(56),google-calendar-api(41),google-api(34),email(31),google-docs-api(26),jquery(24),arrays(23),triggers(22),forms(22),google-app-engine(21),google-visualization(21),user-interface(20),spreadsheet(20),json(19),google-caja(19)
2014 google-apps-script(2758),google-sheets(875),javascript(606),google-form(177),google-drive-api(168),google-docs(143),google-spreadsheet-api(90),google-apps(84),html(81),google-calendar-api(61),google-sites(56),gmail(54),email(53),jquery(49),arrays(45),forms(39),spreadsheet(35),triggers(35),excel(33),json(33),google-docs-api(28),google-api(28),google-app-engine(24),google-visualization(22),google-bigquery(22)
2015 google-apps-script(2781),google-sheets(1134),javascript(714),google-form(159),html(158),google-docs(127),google-apps(115),google-spreadsheet-api(98),google-drive-api(97),gmail(66),arrays(57),google-calendar-api(57),jquery(51),google-api(46),forms(40),spreadsheet(39),email(38),google-docs-api(36),json(35),triggers(33),google-sites(32),regex(32),google-visualization(30),php(23),css(20)
2016 google-apps-script(2888),google-sheets(1198),javascript(783),google-form(156),html(118),google-drive-api(117),google-apps(117),google-docs(77),arrays(74),google-spreadsheet-api(73),json(60),gmail(59),email(46),google-calendar-api(43),google-sheets-api(42),google-api(42),triggers(38),google-visualization(31),jquery(31),spreadsheet(31),google-docs-api(29),date(24),regex(23),forms(22),csv(22)
2017 google-apps-script(3873),google-sheets(1537),javascript(979),google-form(194),html(158),google-sheets-api(137),google-docs(127),google-apps(122),google-drive-api(122),google-spreadsheet-api(114),arrays(110),gmail(85),email(64),json(56),gmail-api(52),google-api(52),triggers(51),jquery(51),spreadsheet(48),google-calendar-api(42),regex(34),google-sites(31),forms(27),custom-function(27),excel(27)
2018 google-apps-script(4716),google-sheets(2062),javascript(1046),google-form(189),google-drive-api(189),google-docs(167),google-sheets-api(165),gmail-addons(155),html(134),triggers(129),gmail(120),arrays(111),google-calendar-api(79),json(68),google-app-maker(63),email(59),google-apps-script-addon(55),gmail-api(54),google-api(50),regex(50),custom-function(48),gsuite(47),google-bigquery(45),google-slides-api(43),web-applications(43)
2019 google-apps-script(6731),google-sheets(3300),javascript(1352),google-form(263),html(250),google-sheets-api(223),google-drive-api(216),google-sheets-formula(168),google-docs(158),gmail(154),web-applications(143),arrays(141),google-sheets-macros(134),triggers(128),google-apps-script-web-application(112),google-calendar-api(88),gmail-addons(85),google-apps-script-addon(85),json(82),google-apps(77),gsuite(76),google-api(69),google-app-maker(64),scripting(61),google-apps-script-editor(61)
2020 google-apps-script(4853),google-sheets(2503),javascript(1221),html(199),google-form(176),google-drive-api(161),google-apps-script-web-application(160),arrays(154),google-sheets-api(149),google-docs(124),google-sheets-formula(120),google-sheets-macros(90),gmail(86),json(85),google-apps-script-simple-triggers(69),google-calendar-api(68),urlfetch(66),google-apps-script-addon(65),spreadsheet(57),triggers(51),gsuite-addons(48),gs-installable-triggers(47),email(47),gsuite(47),google-apps-script-editor(45)

Statistics of gas Tag on Stackoverflow

Gists

This is the statistics for the tag gas on Stackoverflow. This statistics are retrieve from Stackoverflow using Stackexchange API. About 2020, the data is retrieved from 2020-01-01 to 2020-07-01.

This statistics data was obtained at 2020-07-15.

Measurement result

Fig. 1: Year vs. Total questions, Answered, Solved and Closed questions


Table 1: Tags which were used together with gas tag for each year.

Year Used Tag list
2008
2009 gas(12),assembly(11),x86(4),gcc(3),nasm(2),linux(2),relative-addressing(1),disassembly(1),avr(1),macos(1),segments(1),inline-assembly(1),tdm-mingw(1),c(1),directive(1),mips(1),compiler-construction(1),gnu(1),stack(1),multithreading(1)
2010 gas(31),assembly(28),x86(9),ld(6),gcc(4),linux(4),arm(4),gnu(3),c(3),inline-assembly(2),linker(2),elf(1),gdb(1),macos(1),ubuntu(1),mips(1),binutils(1),iphone(1),x86-64(1),64-bit(1),macros(1),intel-syntax(1),compiler-construction(1),python(1),embedded(1)
2011 gas(46),assembly(37),x86(16),gcc(11),c(9),linux(6),gnu(4),64-bit(3),arm(3),nasm(3),att(3),inline-assembly(3),binutils(2),x86-64(2),register-allocation(2),system-calls(1),32-bit(1),cortex-a8(1),fibonacci(1),recursion(1),xcode(1),string(1),mips(1),dwarf(1),callstack(1)
2012 gas(59),assembly(46),gcc(15),x86(10),x86-64(6),macos(6),gnu(6),linux(6),att(5),c(5),arm(4),ld(4),system-calls(3),binutils(3),nasm(3),struct(2),elf(2),syntax(2),interrupt(2),fpu(2),inline-assembly(1),clang(1),webrtc(1),compilation(1),iphone(1)
2013 gas(70),assembly(55),x86(18),x86-64(16),gcc(14),linux(14),att(7),nasm(6),c++(5),inline-assembly(4),c(4),syntax(3),intel-syntax(2),printf(2),arm(2),intel(2),segmentation-fault(2),arrays(2),linker(2),i386(2),ffmpeg(1),ios(1),yasm(1),tasm(1),elf(1)
2014 gas(61),assembly(53),x86(17),c(9),gcc(8),x86-64(7),nasm(5),linux(5),gdb(4),arm(4),stack(3),masm(3),disassembly(3),att(3),inline-assembly(3),arrays(2),32-bit(2),cpu-registers(2),shellcode(1),sockets(1),intel-syntax(1),opcode(1),gnu(1),c++(1),scanf(1)
2015 gas(89),assembly(76),x86(25),att(15),c(13),gcc(12),x86-64(12),gnu(6),nasm(4),linux(4),gdb(3),inline-assembly(3),mips(3),macos(2),clang(2),elf(2),disassembly(2),macros(2),yasm(2),xcode(2),calling-convention(2),makefile(2),ld(2),arm64(2),intel-syntax(1)
2016 gas(97),assembly(86),x86(32),x86-64(17),gcc(16),linux(16),att(14),c(5),nasm(5),osdev(4),ld(4),x86-16(4),linker(4),c++(3),gnu(3),gdb(2),forth(2),riscv(2),dwarf(2),intel(2),memory-alignment(2),intel-syntax(2),macos(2),system-calls(2),real-mode(2)
2017 gas(73),assembly(64),x86(26),gcc(22),att(15),c(11),x86-64(11),intel-syntax(4),gnu(4),linux(4),arm(4),bootloader(4),64-bit(4),nasm(3),x86-16(3),ubuntu(2),osdev(2),inline-assembly(2),gdb(2),macos(2),ld(2),string(2),go(1),if-statement(1),objdump(1)
2018 gas(69),assembly(55),x86(24),x86-64(14),gcc(13),att(6),linux(6),arm(4),macos(3),intel-syntax(3),position-independent-code(3),forth(2),ubuntu(2),x86-16(2),gdb(2),scanf(2),inline-assembly(2),gnu(2),blockchain(2),nasm(2),ld(2),osdev(2),bootloader(2),cygwin(1),debugging(1)
2019 gas(74),assembly(58),x86(21),x86-64(15),gcc(10),att(10),c(8),linux(8),gnu(5),gdb(5),ld(4),macros(3),intel-syntax(3),inline-assembly(2),shared-libraries(2),macos(2),dwarf(2),elf(2),arm(2),addressing-mode(2),machine-code(2),bootloader(2),c-preprocessor(1),pdp-11(1),thumb(1)
2020 gas(68),assembly(55),x86(25),gcc(17),x86-64(16),att(13),intel-syntax(7),c(4),bootloader(4),x86-16(4),osdev(3),arm(3),linux(3),c++(3),gnu(3),linker(3),arm64(2),string-literals(2),powerpc(2),riscv(2),calling-convention(2),ld(2),macos(2),clang(1),abi(1)

Summary

From Fig. 1, it shows that the tag gas is used a lot at 2016. At that time, this tag is used for 97 questions. After 2016, this frequency of gas is a bit low. The average frequency of use is 71.

Statistics of appscript Tag on Stackoverflow

Gists

This is the statistics for the tag appscript on Stackoverflow. This statistics are retrieve from Stackoverflow using Stackexchange API. About 2020, the data is retrieved from 2020-01-01 to 2020-07-01.

Recently, this tag is modified by editing the tags. So I think that it has to be said that this statistics data is obtained at 2020-07-06.

Measurement result

Fig. 1: Year vs. Total questions, Answered, Solved and Closed questions


Table 1: Tags which were used together with appscript tag for each year.

Updated: Taking advantage of Web Apps with Google Apps Script

New section CORS in Web Apps was added to Taking advantage of Web Apps with Google Apps Script

In this section, I would like to introduce CORS in Web Apps. As the result, in order to prevent the error related to CORS, it was found the following important points.

  1. It is required to return ContentService.createTextOutput() and ContentService.createTextOutput("done") from doGet and doPost.

  2. For POST method, the data is required to be converted to the string and sent to Web Apps.

Report: Processing to Create New File to Specific Folder using Drive API

Gists

In this report, I would like to report for processing to create new file to the specific folder using Drive API. When the new file is created to the specific folder using Drive API, the property of parents with the value of folder ID is included in the request body of the method “Files: create”. About this process, I had thought that the file is directly created to the specific folder. But, I could confirm that the new file is created by the following process.

Characteristics of Response for onSelectionChange

Gists

Abstract

I have already reported about “Change Tab Detection on Google Spreadsheet using onSelectionChange Event Trigger with Google Apps Script”. Ref It is considered that when the situation which uses the event trigger of onSelectionChange is thought, the response speed is important. So, here, I investigated the characteristics of response for the event trigger of onSelectionChange.

Demo

Experiment

Sample script

In order to investigate the response speed, I used the following sample script. The work of sample script can be seen at above demonstration movie. In this report, the script is important for discussing the result. So I pot this at this section instead of the appendix.

Benchmark: Process Costs under V8 using Google Apps Script

Gists

  • March 22, 2020
    • Published.

Kanshi Tanaike

Introduction

V8 engine got to be able to be used at Google Apps Script. By this, I have reported about the process costs with and without using V8. Ref It is considered that knowing the process costs for various methods will be useful for creating the applications with Google Apps Script. Here, I would like to introduce the process costs of each situations under V8. The situations which measured the cost are as follows.

Benchmark: Loop for Array Processing using Google Apps Script with V8

Gists

- February 9, 2020 - Published. - March 15, 2020 - Results of "for of" and "for of with iterator" were added.

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes.1 So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process cost for the array processing, because the array processing is often used for spreadsheet and Google APIs. I have already reported “Benchmark: Loop for Array Processing using Google Apps Script”.2 At February 7, 2020, the V8 runtime got to be able to be used in my account. By this, it is considered that it is possibly changed the result of benchmark without V8 2. So I measured about this. In this report, the process cost of “loop” for the array processing using GAS has been investigated with V8 runtime.

Trend of google-apps-script Tag on Stackoverflow 2020

Gists

Published: January 10, 2020

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post the questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring the important information and are much useful for a lot of people. As one of tags, there is “google-apps-script”. I sometimes discuss at the questions with that tag. When we see the discussions, we can notice that the discussions are changed and progressed by the time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change as the trend of tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers and tags adding to the tag of “google-apps-script”. The trend of tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Benchmark: Importing CSV Data to Spreadsheet using Google Apps Script

Gists

August 28, 2019 Published.

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes for Consumer and Google Apps free edition, and 30 minutes for G Suite and Early Access. 1 So many users always have to pay attention to reducing the process cost of scripts. So it is very important to know the process cost of various situations. I have already reported the costs for various processes as the reports. 2 In this report, the process cost for importing CSV data to Spreadsheet using GAS has been investigated.

Trend of google-apps-script Tag on Stackoverflow 2019

Gists

March 25, 2019 Published.

Kanshi Tanaike

Introduction

At Stackoverflow, a lot of people post the questions and answers to the questions every day. There are various tags in Stackoverflow. A lot of discussions are performed at each tag. Their discussions bring the important information and are much useful for a lot of people. As one of tags, there is “google-apps-script”. I sometimes discuss at the questions with that tag. When we see the discussions, we can notice that the discussions are changed and progressed by the time, because “Google Apps Script” which is the origin of the tag is updated. This report thinks this change as the trend of tag of “google-apps-script”. This trend includes the number of questions, questioners, answerers and tags adding to the tag of “google-apps-script”. The trend of tag of “google-apps-script” is deeply related to the progression of Google Apps Script and the various applications for Google Apps Script.

Update: Taking advantage of Web Apps with Google Apps Script

“Taking advantage of Web Apps with Google Apps Script” was updated. A section of “How to use dev mode from outside” was added.

  • When you deploy Web Apps, you can see the link labeled latest code. The link is like https://script.google.com/macros/s/###/dev. When you access to the link of latest code using your browser under you login to Google, you can access to Web Apps with the dev mode. But if you want to access to Web Apps with the dev mode from outside, there are no documents for the method. Here, it introduces such method.

You can check this at https://github.com/tanaikech/taking-advantage-of-Web-Apps-with-google-apps-script.

Benchmark: Reading and Writing Spreadsheet using Google Apps Script

Gists

Benchmark: Reading and Writing Spreadsheet using Google Apps Script

October 12, 2018 Published.

October 18, 2018 Updated. In order to compare with Advanced Google Service, a result of Sheets API by UrlFetchApp was added to Appendix.

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes for Consumer and Google Apps free edition, and 30 minutes for G Suite and Early Access. 1 So many users always have to pay attention to reducing the process cost of scripts. So it is very important to know the process cost of various situations. I have already reported the costs for various processes as the reports. 2 In this report, the process cost for reading and writing values for Spreadsheet using GAS has been investigated.

Asynchronous Processing using Event Triggers

Gists

September 21, 2018 Published.

Kanshi Tanaike

Overview

This is a report about the possibility of asynchronous process using event triggers. This is for Google Apps Script (GAS).

Description

onEdit() which is a simple trigger is often used as a trigger when the values are modified on Spreadsheet. When users want to use the script including some methods which are required to be authorized as the onEdit event, a installable trigger of onEdit is used. If the trigger is installed for the function of onEdit(), when the event trigger is run, onEdit() is run 2 times. In order to avoid this, the installable trigger is installed to the functions except for the functions of simple triggers. The functions of simple triggers which is the same events are not used in the project. When I thought about this situation, I thought that both onEdit() which is run by the simple trigger and the function which is run by the installable trigger might be able to be used, simultaneously. So I investigated about this situation.

Benchmark: Decreasing Loop for Array Processing using Google Apps Script

Gists

Benchmark: Decreasing Loop for Array Processing using Google Apps Script

August 11, 2018 Published.

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes. 1 So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process cost for the array processing, because the array processing is often used for spreadsheet and Google APIs. I have already reported the process costs for various processes as reports. 2-7 In this report, the process cost of “Decreasing loop” for the array processing using GAS has been investigated.

Benchmark: Conditional Branch using Google Apps Script

Gists

Benchmark: Conditional Branch using Google Apps Script

July 11, 2018

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes.1 So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process cost for the array processing, because the array processing is often used for spreadsheet and Google APIs. Recently, I have already published some reports about the process cost using GAS.2-6 From these reports, it has found that GAS shows much different process cost from other languages. So it is important to investigate the process cost for various scenes. In this report, the process cost of “conditional branch” using GAS has been investigated.

Benchmark: Search for Array Processing using Google Apps Script

Gists

Benchmark: Search for Array Processing using Google Apps Script

July 2, 2018

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes.1 So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process cost for the array processing, because the array processing is often used for spreadsheet and Google APIs. Recently, I have reported about the process cost of the loop for the array processing.2 Also I have reported “Improved Algorithms for Summation of Array Elements” as a method for reducing the process cost.3 From these reports, it has found that GAS shows much different process cost from other languages. So it is important to investigate the process cost for various scenes. In this report, the process cost of “searching strings in an array” for the array processing using GAS has been investigated.

Retrieving Reformatted Scripts without Comments in a Project using Google Apps Script

Gists

Overview

This is a sample script for easily retrieving the reformatted scripts without comments in a project using Google Apps Script (GAS).

Description

When I create GAS script, if the format of script is not correct, the script editor lets me know about it. By this, I can find that the script editor and/or Google Drive checks the format of scripts. I had wished if I could use this function. Recently, I noticed an interesting function. A GAS project is created and when function myFunction() {Logger.log(this)} is run in the script, I noticed that all scripts in the project are included in this. Furthermore, when I saw the retrieved script, also I noticed that their scripts are reformatted and all comments are removed. In the case of Apps Script API, when the scripts are retrieved by the API, the retrieved script is the same to the original one. So I think that this will help users retrieve simply the reformatted GAS scripts, and such the reformatted scripts will be able to be used for the various situations.

Remove Third-party Apps with Account Access using Google Apps Script

Gists

Overview

This is a method for removing Third-party Apps with Account Access using a script.

Demo

Description

When users create a script in a project and run the script, if the methods which are required to use scopes are included, users have to authorize to use the scopes using the browser. By authorizing it, users can use the script. The authorized projects can be seen at Third-party Apps with Account Access. One day, I had a situation that it required to remove the authorization of project, because of the security. Third-party Apps with Account Access can be manually removed as you know. But at that time, I wanted to remove using a script. So I came up with this method.

Taking advantage of Web Apps with Google Apps Script

Overview

This is a report to take advantage of Web Apps with Google Apps Script (GAS).

Description

There is Web Apps as one of applications using Google Apps Script (GAS). I sometimes use this Web Apps. But I have only a little the information for the specification of Web Apps. So in order to take more advantage of Web Apps, I investigated and summarized about this. The aim of this report is to become one of the basic information for creating various applications using Web Apps with GAS.

Benchmark: fetchAll method in UrlFetch service for Google Apps Script

Gists

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.

Benchmark: Loop for Array Processing using Google Apps Script

Gists

Benchmark: Loop for Array Processing using Google Apps Script

April 16, 2018 Published.

July 26, 2018 Updated. Result of reduce was added.

Kanshi Tanaike

Introduction

Please be careful! This result can be only used for Google Apps Script.

There are a limit executing time for Google Apps Script (GAS). That is 6 minutes.1 So users always have to pay attention to reducing the process cost of the scripts. Especially, it is very important to know the process cost for the array processing, because the array processing is often used for spreadsheet and Google APIs. I have already reported “Improved Algorithms for Summation of Array Elements” as a method for reducing the process cost.2 In this report, the process cost of “loop” for the array processing using GAS has been investigated.

Benchmark: Event Objects for Google Apps Script

Gists

Introduction

There are event objects at Google Apps Script. Typically, users which use Spreadsheet often use onEdit(event). Here, I would like to introduce the process costs for the event objects using this onEdit(event).

When onEdit(event) is used for the spreadsheet, event of onEdit(event) has the following structure.

{
  "authMode": {},
  "range": {
    "columnStart": 1,
    "rowStart": 1,
    "rowEnd": 1,
    "columnEnd": 1
  },
  "source": {},
  "oldValue": "old sample text",
  "user": {
    "nickname": "sampleName",
    "email": "sample email"
  },
  "value": "sample text"
}

In this structure, for example, the range of active cell is "range": {"columnStart": 1, "rowStart": 1, "rowEnd": 1, "columnEnd": 1 }. Namely, it’s “A1”. Users can use the range of active cell using this event object. In this report, I have investigated the process cost for retrieving the range of active cell as a sample.

Benchmark: Effect of Comprehension for GAS

Description

There are a limit executing time for Google Apps Script (GAS). It’s 6 minutes. So users have to pay attention to the process cost of the script. GAS can use JavaScript 1.7. This means to be able to be used comprehension for GAS.

In this report, the process cost for the comprehension has been investigated. The normal for loop was used as the competitor. As a result, it was found that the comprehension can be used one of methods for reducing the process cost. For 1 dimensional array, the process cost of comprehension is about 60% lower than that of the normal one. For 2 dimensional array, the process cost of comprehension is about 50% lower than that of the normal one. Each data is the average for 10 times measurements.

Python Library - souwapy

This “souwapy” is a library for summing array elements with high speed by new algorithm (Pyramid method). The speed is faster than csv and panbdas module of python and v8 engine of node.js. The souwapy module is 2.3 and 3.1 times faster than csv and pandas module, respectively. This was really surprised me. It was found that the theory was correct.

At first, I have created this theory for Google Apps Script. But recently I had to use large data and output a csv file on python. So I made this library. Additionally, I had wanted to know how to public own library to PyPI before. This chance was good for me. If this library is helpful for other people, I’m glad.

GAS Library - SOUWA_GAS - Effects on Optimized Codes of Pyramid Method

Kanshi TANAIKE

Abstract

I have already reported that the pyramid method is one of very effectively algolithms for summing string elements in an array using Google Apps Script (GAS). This report describes the adaptability of the pyramid method to any languages except for GAS. c++ (g++), Go, Java, Javascript on Node.js, Python and Ruby were chosen as the sample languages. In those languages, there are languages which have the distinctive commands for summing the array elements. In this report, “+” operator as a standard command and a special command for each language were used. For c++ (g++), Javascript on Node.js and Python which have no distinctive commands for summing the array elements, only “+” operator was used. For others, both “+” operator and each special command such as “[]byte”, “StringBuilder” and “«” were used. For languages without the distinctive commands for summing, the pyramid method made us show some interesting phenomena. It was found that the pyramid method shows a good effect on only the specific language. It was found that “+” operator had been optimized for g++ and Node.js. “+” operator of Python was corresponding to theoretical results. This means that “+” operator of Python is not optimized. On the other hand, for languages with the distinctive commands for summing, it was found that the distinctive commands is incompatible to the pyramid method. These results made us show the possibility of visualization for the optimized codes.

Improved Algorithms for Summation of Array Elements

Kanshi TANAIKE

Abstract

I considered an efficient algorithm for summation of array elements. All elements in an array are string. When those elements are summed using scripts, a standard method is to add each element in order. If the script is run without any optimize, the process becomes gradually sluggish, because the total amount of active data during the summation process is proportional to the square of the number of array elements. This leads directly to the high process-cost. Such phenomenon notably appears at Google Apps Script (GAS). This report says about the solution of this problem using a new algorithm of a pyramid method. The pyramid method achieves that the total amount of active data increases proportional to the linear of the number of array elements. By this, the processing time becomes much shorter than that of the process using the standard method. The pyramid method achieved the process-cost reduction of $99.7%$ compared with the standard method at GAS. I realized again that new discoveries are hidden into the familiar scenes of every-day life.