The Problem: Formatting Exercises in Google Docs

Imagine you have content in a Google Doc that looks like this: Exercise 1: Introduction to Functions Learning Objective: Understand how functions work in JavaScript.Exercise 2: Variables and Scope Learning Objective: Learn about variable declaration and scope in JavaScript. You want to:✅ Set each “Exercise” heading to Heading 3.✅ Move “Learning Objective:” and the following … Read more

Working with APIs Google Apps Script

Setting up Twitter API First, create a Twitter developer account and an app to acquire the Bearer token. Then, utilize UrlFetchApp in Google Apps Script to access Twitter API, incorporating “Authorization: Bearer …” in the request header. Below is a step‐by‐step guide on how to use Google Apps Script (GAS) to connect to the Twitter … Read more

Display sheets in popup Modal

Apps Script Code (Code.gs) function showModal() { var html = HtmlService.createHtmlOutputFromFile(‘Index’) .setWidth(400) .setHeight(300); SpreadsheetApp.getUi().showModalDialog(html, ‘Select a Sheet’);}function getSheetNames() { var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); var sheetNames = sheets.map(sheet => sheet.getName()); return sheetNames;}function findSheetData(sheetName) { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName); if (!sheet) return { success: false, data: [] }; var data = sheet.getDataRange().getValues(); return { success: true, data: … Read more

Automate Heading Updates in Google Docs with Google Apps Script

Large documents often contain structured sections with headings. If you decide to change formatting or restructure your document, manually updating each heading can be a hassle. Google Apps Script lets you: ✅ Automate repetitive tasks – No more manual editing.✅ Ensure consistency – Keep document formatting uniform.✅ Save time – Update headings instantly. 🔹 Script … Read more

140 Google Apps Script Coding Snippets PDF Download Copding Examples Apps Script

Welcome to Google Apps Script: 140 Common Coding Examples, a comprehensive guide designed to equip you with essential tools and techniques for automating and enhancing Google Workspace. This book is packed with practical, easy-to-understand code snippets that streamline workflows, simplify data handling, and add powerful functionality to Google Docs, Sheets, Forms, and more. Whether you’re … Read more

A Memorable Day at Google DevFest 2024 London with Laurence Svekis

On January 25, 2025, the tech community of London, Ontario came together for an incredible day of learning and collaboration at Google DevFest 2024, hosted at The D.B. Weldon Library, Western University. From 11:00 AM to 4:00 PM, over 130 enthusiastic developers, students, and tech enthusiasts gathered to explore the latest in AI, Android, Cloud, … Read more

Automating Google Docs: Adjusting Heading Levels with Apps Script

Google Docs provides a powerful platform for creating and organizing documents, but managing heading levels across a document can sometimes become tedious. If you’ve ever wanted to automatically adjust headings to one level lower throughout a document, you’re in luck! The updateHeadingLevels script simplifies this process, ensuring all headings are updated correctly while preserving formatting. … Read more

Automate Course Code Matching in Google Sheets with Google Apps Script

Google Apps Script is a versatile tool that can simplify repetitive tasks in Google Sheets. In this post, we’ll explore a script that automates the process of matching course codes from multiple sheets and adding them as additional columns in a main sheet. This solution is perfect for managing large datasets where matching values across … Read more

Google Apps Script that locks the first row as a heading

Script: function lockFirstRowAsHeading() { // Open the active spreadsheet var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); // Check if the first row is already frozen if (sheet.getFrozenRows() !== 1) { // Freeze the first row sheet.setFrozenRows(1); } // Notify the user SpreadsheetApp.getUi().alert(“The first row has been locked as a heading.”);} How It Works: Steps to Use: Result: The … Read more

Creating a Filtered Sheet in Google Sheets with Google Apps Script

Google Apps Script is a powerful tool that lets you automate tasks and enhance the functionality of your Google Sheets. In this post, we’ll walk you through how to create a script that filters data from a sheet named main and copies rows with non-empty values in columns A, B, and C into a new … Read more