AppsScriptPulse

Send Charts In Email Using Google Apps Script

… how to send Charts in Email using Google Apps Script. Sending charts on Email can be used to send the attendance charts of the students, sales chart for the week, share price charts, etc.

Always nice to see others in the Apps Script community use the work of others for inspiration and reshare the results. In this post latest post from Aryan Irani you can learn how to send charts from Google Sheets. This post covers a basic technique that you can easily expand on (if you are having issues with the charts rendered in your emails using this solution check out my referenced post for an alternative method).

Source: Send Charts In Email Using Google Apps Script

How to Make your Documents Read-only in Google Drive using Google Apps Script – Digital Inspiration

Your documents and files in Google Drive can be modified by anyone who has edit access to the file. You can always remove external collaborators from your documents to prevent them from editing your files but how do you prevent yourself (the owner) from accidentally editing your own files in Google Drive? Google Drive doesn’t have a simple button (yet) for locking files so here’s a little Google Script that can help you make any file in your Google Drive read-only.

Nice post from Amit Agarwal showing how the new Google Drive Locking API can be used with Google Apps Script. The post contains all the code and instructions you need to get started.

Source: How to Make your Documents Read-only in Google Drive – Digital Inspiration

Google Apps Script: 3 Google Sheets Custom Functions to Allocate Items from a Column and Spread Them Out into a New Column N Times – Yagisanatode

Imagine if you have a set of data, say, Cat, Dog, Goat and you want to create a new column where each item is repeated 3 times. Essentially what we are doing here is spreading out our original … There is no real easy approach to do these things with the standard Google Sheets Formulas (Known as Functions in Google Sheets). Fortunately, we can create custom functions with Google Apps Script to do the job.

In this post, I will go over the 3 custom functions that I created to solve these three problems. I’ll then provide a quick-use guide if you just want to dive in and get started using them. Finally, I go over some of the interesting parts of the Google Apps Script code for those of you who wish to learn more about creating your own custom functions.

Source: Google Apps Script: 3 Google Sheets Custom Functions to Allocate Items from a Column and Spread Them Out into a New Column N Times – Yagisanatode

Create PDF from a Google Form submission using Google Apps Script

In this blog post , we will cover how to create a PDF from the responses of Google Form using Google Apps Script.

If you are looking for some guidance on creating and sending PDF Documents from Google Form responses this post has all you need to get started.

Source: Create PDF Using GoogleApps Script

Working with Pivot Tables in Google Sheets using Google Apps Script

Pivot tables are a quick and powerful way to analyse data. Using Google Apps Script, there is an ability to build and modify pivot tables in Google Sheets. In this post I’ll share some tips and tricks for interacting with pivot tables in Google Sheets.

Source: Working with Pivot Tables in Google Sheets using Google Apps Script

Benchmark: Process Costs for Searching Values with TextFinder in Google Sheets using Google Apps Script

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.

TextFinder is a relatively new addition to Google Apps Script with was released on April 5, 2019. TextFinder is part of the Spreadsheet Service and provides methods for finding or replacing text within a range, sheet or spreadsheet. There have been some reports on Stack Overflow that the TextFinder methods can be relatively slow to execute compared to using native JavaScript techniques. This post by Tanaike explores the process time of TextFinder against other techniques. Click through to the source for the results and code for running the experiment.

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

Adding some AutoFill magic to your Google Sheets projects with Google Apps Script

Google Sheets users can already use the magic of AutoFill to expand data automatically detecting a series of numbers, letters or dates. This feature is particularly powerful even when your series includes text or repeating dates. In this post I’ll highlight how you can also use AutoFill in your Google Apps Script projects

This post is designed for both no/low coders and expert developers interested in finding out how you can use AutoFill in your Google Sheets/Apps Script projects.

Source: Adding some AutoFill magic to your Google Sheets Apps Script projects

Send Rich Text HTML Emails with Google Sheet – Digital Inspiration

You can format the source data in Google Spreadsheet in different colors, fonts and sizes and all your cell formatting will be retained in the email messages.

Very handy code snippet from Amit Agarwal which lets you convert the formatted text in a Google Sheets cell to HTML. In the example Amit uses the formatted text in an email sent with MailApp but you might find other uses for this solution. Click through to the source link for all the details…

Source: How to Preserve Formatting of Spreadsheet Cells in Mail Merge – Digital Inspiration

Dashboards in your inbox – Revisting tips on emailing inline Google Sheet chart images with Google Apps Script

Back in 2015 I shared a post on Tips on emailing inline Google Charts from Sheets using Apps Script, which looked at how you can email charts from Google Sheets. This solution is one I use in my work on a daily basis and remains largely unchanged. More recently I was faced with the problem that I couldn’t include a Combo Chart. In this post I revisit this problem and share a solution for including copies of your Google Sheet charts in your email reports.

Whilst this solution focuses on extract Google Sheets chart images for the purpose of emailing, the technique might be of interest for other situations where you need to use a chart image.

Source: Dashboards in your inbox – Revisting tips on emailing inline Google Sheet chart images with Google Apps Script

Measure Core Web Vitals of your Websites with Google Sheets – Digital Inspiration

Core Web Vitals are a set of metrics defined by Google to help webmasters understand the performance of their websites. You can automate the measurement and tracking of core vitals with Google Sheets.

Another incredibly rich resource from Amit Agarwal containing useful guidance on not only performance of websites and potential impact on search ranking, but also a very concise coding pattern for reading and writing data in Google Sheets.

Source: Measure Core Web Vitals of your Websites with Google Sheets – Digital Inspiration