tanaike

The Thinker

Showing Specific Rows and Columns in Google Spreadsheet using Google Apps Script

Gists This is a sample script for showing the specific rows and columns in Google Spreadsheet using Google Apps Script. When you export a Google Spreadsheet as a PDF file, you might have a case where you want to export the specific rows and columns in a sheet. In this post, I would like to introduce the sample script for achieving this. Script Please copy and paste the following scripts to the script editor of Google Spreadsheet.

Removing Vertical Borders of Table in Google Document using Google Apps Script

Gists These are sample scripts for removing the vertical borders of a table in Google Document using Google Apps Script. Unfortunately, in the current stage, only the vertical borders cannot be removed from the table in Google Document using the Google Document service (DocumentApp). I believe that this might be resolved in the future update. But, in the current stage, when Google Docs API is used, this can be achieved. So, Google Docs API can be used as the current workaround.

Retrying UrlFetchApp by an Error using Google Apps Script (RetryFetch)

Gists This is a sample script for retrying UrlFetchApp of Google Apps Script when an error occurs. When the HTTP request is run using UrlFetchApp, there is a case that an error occurs in various situations. And, there is a case that when the request is run again, no error occurs. This sample script can automatically retry the requests using Google Apps Script. Sample script This is Class RetryFetch. /** * UrlFetchApp is run by retrying when an error occurs.

Requesting with Keeping Cookies using Google Apps Script (SessionFetch)

Gists This is a sample script for requesting with keeping cookies using Google Apps Script. This might be similar to requests.Session" of Python. Ref Sample script This is Class SessionFetch. /** * UrlFetchApp is run by keeping Cookie. */ class SessionFetch { constructor() { this.cookie = ""; this.his = []; } /** * Request URL. * @param {string} url URL * @param {object} params Object * @return {UrlFetchApp.

Retrieving Files of 'Shared with Me' in Specific Folder using Google Apps Script

Gists This is a sample script for retrieving the files of ‘Shared with Me’ in the specific folder using Google Apps Script. In the current stage, when you transfer the ownership of your file on your Google Drive to another user and/or copy the file “Shared with me” to the specific folder on your Google Drive, the file becomes the shortcut file. Under this situation, when you want to retrieve the files of “Shared with me” in the specific folder, unfortunately, the following search query cannot be used.