Gists
This is a sample script for updating the values of “Sheet A” with the values of “Sheet B” using Google Apps Script. I often see this situation at Stackoverflow and other sites. So, in this post, I would like to introduce the sample script using Google Apps Script.
Sample script function myFunction() { const ss = SpreadsheetApp.getActiveSpreadsheet(); const [src, dst] = ["Sheet1", "Sheet2"].map((e) => ss.getSheetByName(e)); const obj = src .
Gists
This is a sample script for reducing the table height of the table inserted from Google Spreadsheet to Google Slides using Google Apps Script.
Sample script Please copy and paste the following script to the script editor of Google Slides. This sample script uses Slides API. So, please enable Slides API at Advanced Google services. Ref
As the sample situation, this script supposes that a table is manually copied from Google Spreadsheet to the 1st slide of Google Slides.
Gists
This is a sample script for retrieving the glyph value from the list items of Google Document using Google Apps Script.
In the current stage, when the list is put to the Google Document, the count of glyph is automatically calculated. When the glyph values of the list items are tried to be retrieved using the manual operation and the script, unfortunately, the glyph values cannot be retrieved. Only the values of the list are retrieved.
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.
GitHub
This is a sample script for the file picker using Google Apps Script and Javascript without 3rd party. I had created the same sample script before. Ref But, in the case of that script, jQuery is used. And, only Google Drive of own account could be used. In this sample script, 3rd party of jQuery is not used, and also, not only Google Drive of your own account, but also Google Drive of the service account can be used.