Random blog posts
Page Content hide
1 Welcome to Desktop Liberation

Welcome to Desktop Liberation

The definitive resource for Google Apps Script and Microsoft Office Automation

I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time.

The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it.

I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.

You can navigate the content of the site by clicking on the main categories located on the menu, by selecting a category on the right or by using the search button.

For those who prefer book and eBook formats, a 450+ page deep dive into Apps Script. Especially useful for those transitioning from another platform. All formats are available from O'Reilly, Amazon and all good bookshops. You can also read a preview on O'Reilly
An accelerated video course over about 8 hours and 70 lessons taking you through JavaScript and Apps Script from start to finish. Available at O'Reilly, Infinite Skills and all good media outlets
A video course over about 8 hours and 70 lessons taking you through the basics of Apps Script and JavaScript . Available at O'Reilly, Infinite Skills and all good media outlets.

This site and its community aims to help you use cloud based APIS and services without being constrained by your desktop software. There’s a particular emphasis on Google APIs and JavaScript, but there’s also plenty of Microsoft and other stuff here too. All code here is unprotected and free to re-use.

Since the creation of this website, I have noticed that the below topics are by far the most popular*

JSON and Excel. Using VBA classes that emulate JavaScript objects, parsing and stringifying JSON and dealing with data from external services. Includes a data driven REST-EXCEL library, and implementation of Google oAuth2 authenticationD3.js is a brilliant javaScript library for building complex interactive visualizations. Here’s how to create them straight from Excel Data without needing to know any javaScript, as well as some non-Excel examples.
MAPS and Earth.Integrating Excel with Google Maps and Google Earth, including geoCoding, automatically building data driven web based apps from Excel data, and all things Geo.From VBA to Apps Script. Migrating from VBA to Google Apps Script, or using them simultaneously can be hard to get started with. Although this material has been largely superceded by Going Gas, there’s stll some useful stuff here.

The 7 topics below are the most recently published

Going Gas Abridged extracts from my book – Going Gas: from VBA to Apps Script. Featuring examples of the new Execution API.Goa authentication. An Apps Script library that takes care of authentication to a number of services such as Google, Microsoft, Github and others.
Going Serverless. How Firebase and Firebase cloud functions can help you go serverless, and forget all about the messy business of infrastructure configuration and maintenanceA collection of Google Apps Script/JavaScript snippets.I add a new one every now and again. A good place to start if you just want to get a feel for Apps Script, ranging from simple to esoteric and obscure
Integrate VBA projects with GitHub. An automated way of managing your VBA code, creating documentation on the fly, getting it to GitHub and creating workbooks directly from GitHub VBA code.Google Cloud Platform. Assorted GCP (Google Cloud Platform) topics and how tos.
Integrate VBA with JavaScript. Run JavaScript code directly in VBA using JS libraries on the Internet, or created locally. Opens up great possibilities for using Open Source code in VBA

For the geeky out there, those are the 4 most geeky things I have written about

Promises and Excel.Using promises in JavaScript and other languages is the preferred way to orchestrate the completion of asynchronous activities. Here’s a (not perfect but fun) Promise implementation in VBA. Example includes getting data from Google Fusion tables.Color Mathematics.The mathematics of color is a complex and interesting topic. Here you’ll find Google Apps Script, VBA and javascript examples of color manipulation including finding the closest match to a given color in a defined color scheme, and the infamous heatmap doughnut chart.
React,Redux,Redis,Material-UI and Firebase. A whole bunch of front end platform libraries that go together really well, but that are hard to grasp and get started with. Here’s a bunch of snippets to help show how all these things interact..Automatic VBA documentation and creation of apps script skeletons.Automating document ,creating Google Visualization and static tables of VBA projects, serialize instances of VBA classes and generating Google Apps Script skeleton of VBA projects.

Content preview

2018 – yet another year in and out of Google Apps Script

For some years now I’ve been writing this annual summary around Christmas time, on how my year in Apps Script has been. I’m very late this year, but it’s been a pretty busy one both […]


Apps Script Back end platform – some thoughts on a different approach

Apps Script runs on Google Servers, probably the Rhino JavaScript  engine running on Google App Engine. Rhino is written in Java and the implementation used by Apps Script seems to be at about ES5.1, which […]

1 comment

Is it still worth creating blogposts ?

I’ve considerably cooled on the whole blogging thing over the years, preferring to post either to communities, github, to my tutorial site or my YouTube channel, or to work on more substantial resources, such as books or […]


How about free VM for Chromebook owners?

I’ve been using a Chromebook for a few years now, and find myself going for long stretches without needing to turn on a Windows machine or an Apple Mac. At first, I was a little […]


2016 – Another year in Apps Script

2016 The real world of 2016 has been full of madness, badness and sadness. It’s impossible to reflect on its events without thinking of the divisiveness, nastiness and mean-spiritedness that we’ve all seen, and I […]


App Maker – Build engaging custom apps on G Suite with minimal coding

What is App Maker App Maker provides a ‘low code’ way to create professional looking G Suite custom apps without having to try too hard. You can drag and drop widgets on a form canvas, […]


Using an Apps Script webapp to distribute assets

I wasn’t completely satisfied with the distribution method for the assets associated with my first Apps Script book and subsequent video course. Most of the assets were Apps Script files, and the delivery method was via […]


Change from project key to scriptid

The Apps Script Script service is deprecating the getProjectKey() method. At this time it’s not clear when or why, but it does mean that if you are using the project key to create Oauth2 redirect […]


What I’ve learned from my first play around with BigQuery/Sheets integration

So this just happened. BigQuery integration with Sheets!. This is great; now you can use a spreadsheet as a federated datasource for BigQuery, and therefore query (and join with other massive datasets) your spreadsheet data […]


Targeting training material for Google Apps Scripters

Google Apps Script is the script language for Google Apps. If you are an Office user, think VBA, but in the cloud, with all the connectivity and share-ability that brings, and as an added bonus, […]


A belated post – 2015 – a year in Apps Script

I’ve more or less stopped using blogger this year – looking back I’ve only made 6 posts since my end of 2014 post summarizing that year. Instead, I’ve been continuing to focus on  desktop liberation […]


Null should mean something

It’s a common pattern in JavaScript to do this to assign a default value to a variable :

In other words, if someThing has a ‘falsey’ value (false, null , undefined , ” ,0) […]


Running JavaScript directly from Excel makes ‘going Google’ easier

I’ve been dong a lot of writing over on Desktop Liberation looking at techniques to run Apps Script/JavaScript code directly from VBA, In this post I’m going to talk about how useful this can be if […]


GitHub and VBA integration

If you develop shared code for VBA, you’ve probably got some massive workbooks that contain multiple projects that you wish you could separate, but it’s too complicated because they are sharing classes and functions. The […]


Some best practise notes on DbAbstraction usage

    Since we have a lot of operations going through the database abstraction libraries nowadays (over 3 million since I released this in summer last year),  I thought I’d give a few hints. I’ll […]


First shot at Polymer

I’ve just completed my first Polymer app and have mixed feeling about the experience. Regulars to this blog and the associated site know that I’m a great fan of Google stuff and like to try out […]


A year in the desktop liberation blog

I posted the other day in A year in apps script and my bucket list my take on what happened in the Google Apps Script world in 2014, and my hopes for 2015. As many of you […]


A year in apps script and my bucket list

2014 has been an eventful year for Google Apps Script with some great new capabilities arriving (add-ons), as well some useful ones (ScriptDB) being deprecated. In this post I’ll cover my highlights and lowlights of […]


Google Apps Script locking and optimum wait times and the golden ratio

You are probably familiar with the Google Apps Script Lock Service, which is a way of preventing concurrent access to sections of code. It works well, but the problem is that it’s a fairly blunt […]


How many requests a second can you throw at your Google Apps Script webapp

There was a question on the Google Apps Script Community the other day. It went something like this. This is an important question, because if you have a webapp, potentially used by many people – […]

apps script drive pile of files

Getting ‘a pile of files’ from Google Drive with Apps Script

The method for doing this is actually part of the bmFolderFun library documented in A handier way of accessing Google Drive folders and files from Apps Script but it can be really useful for keeping […]

sheets google apps script

Supercharging copying files between Drive and Cloud Storage from Apps Script with Cloud Run

In Blistering fast file streaming between Drive and Cloud Storage using Cloud Run I showed how you could use Cloud Run to hand off transfers between Drive and Cloud Storage to make them faster and […]

apps script v8

A handier way of accessing Google Drive folders and files from Apps Script

The usual way to access files and folders on Drive from Apps Script is via their ID, yet on other platforms we’re more used to using file and folder paths. This can be a bit […]

copt between drive and gcs

Blistering fast file streaming between Drive and Cloud Storage using Cloud Run

A friend of mine hit an Apps Script problem the other day when transferring large amounts of data between Drive and Cloud Storage. We’ve all had the mysterious ‘unexpected Javacript runtime error’ from the IDE […]

apps script v8

Apps Script V8: Sorting out the call stack to figure out who called

Let’s say you need to find out how your function was called, either for in app debugging or some other purpose. A JavaScript Error has a non standard property (stack) that contains some info about […]

sheets google apps script

JavaScript snippet to create a default method for an object

Today’s snippet is going to be shorter than usual, because there’s a really easy solution. Many objects have a default method like toString(). You may want to add one of those to your own functions  […]

temporal timezones utc

Sheets Workbook functions in Apps Script – Date and Time and Temporal primer

This article will cover the translation of the Sheets workbook functions for Date and Time manipulation to Apps Script. Virtually all of them will be covered, except for a few exotic ones that I might […]

Apps Script library tracking

Sheets Workbook functions – converted to Apps Script

One of the things missing from Apps Script compared to VBA, is the ability to run workbook functions, which you can do in VBA I’ve often thought about implementing the sheets functions from Apps Script, […]

temporal wall-clock-time

Temporal – dates, times and timezones and the proposed new Date system for ECMAScript

The idea for Temporal came from a conversation about how poor the Date implementation of JavaScript is. Some history of that is in this blogpost, where Brendan Eich reveals he pretty much copied  Java date […]

apps script skewed distribution

Random and fake test data in Sheets with Google Apps Script

Sometimes you need to generate some fake data for a spreadsheet. In this post I’ll cover a few utilities in 2 separate libraries that can help with this. Faker This is a node module to […]

Apps Script – How to track library and script usage

Motivation You’ve written a great Apps Script library and you want to know how many people are using it, and perhaps even which parts of the library they are using, and how often. Perhaps you […]

crusher files on drive

Sharing data between Apps Script and Node using Google Drive back end – 5 minute example

Another quick demo of data sharing Here’s a challenge that shares the data in a spreadsheet with node, set up end to end in less than 5 minutes. This example is almost exactly the same […]


The nodejs Drive API, service account impersonation and async iterators

This is part of the series on sharing data between Apps Script and Node on various backends, Apps script library with plugins for multiple backend cache platforms but the Drive API introduces a number of tricky […]

Sharing data between Apps Script and Node using Google Cloud Storage (GCS) back end – 5 minute example

Another quick demo of data sharing There are many ways to accomplish this of course, but using Caching across multiple Apps Script and Node projects using a selection of back end platforms is pretty fast to […]

Sharing data between Apps Script and Node using Github back end – 5 minute example

Quick demo of data sharing There are many ways to accomplish this of course, but using Caching across multiple Apps Script and Node projects using a selection of back end platforms is pretty fast to set […]

Sharing data with Upstash between Node and Apps Script – end to example in 5 minutes

Quick demo of data sharing There are many ways to accomplish this of course, but using Caching across multiple Apps Script and Node projects using a selection of back end platforms is pretty fast to set […]

Caching across multiple Apps Script and Node projects using a selection of back end platforms

Motivation I’ve always been interested in ways to get multiple projects in Apps Script sharing data more easily and in a more standard way, independently of whatever platform is being used to host the data […]

apps script crusher on github

Github as an Apps Script cache platform

Github as an Apps Script cache platform Another plugin available for Apps script library with plugins for multiple backend cache platforms so we can use Github as a back end for caching large objects across […]

upstash graphql explorer

Upstash as an Apps Script cache platform

Upstash as an Apps Script cache platform Upstash is a brand new service offering a serverless redis over https  via a GraphQL  API. Previously redis was hard to use along with Apps Script since we […]

upstash graphql console

3 Favourite things in one article – redis, apps script and graphQl

Apps Script, Redis and GraphQL – together I’m a great fan of both Redis and GraphQL. You’ll find plenty of articles about them around on this site. Although I’ve showed many examples of GraphQL and […]

Sankey diagrams direct from Excel – update

Being able to create Sankey Diagrams in D3 directly from Excel continues to be one of the most popular topics on the Excel Liberation site even though I first posted this a long time ago now. […]


Exploring blogs and sites by d3 tag visualization and effect on site visits

Here’s the daily visits to the Excel Liberation site over the past couple of years. But what’s that over the past 3 weeks, starting 3rd June ..a 40% sudden increase that seems to be sustaining. On […]


Google Fusion Big Data and D3 integration: flight data visualization

In Flight Data from Fusion I introduced integration between Google Fusion and D3.js. This next version fixes up a few issues to do with Google Fusion API quotas and limits (see exponential backoff and jquery promises), and […]


jQuery promises and exponential backoff

When using services like Google Fusion API, sometimes you get errors because of over quota attempts – too many requests in too short a time, or the infrastructure is just too busy to service them. […]


Playing around with Tableau Public

With Tableau, you can do loads of visualizations very simply and publish them on “tableau public”. I never tried Tableau before, so I downloaded the tableau public software to play around with. The other day, […]


Visualization of Sites to Tags with d3.js

When we explore a web site, the usual view is that of a tree structure of pages. I wondered if it could be done instead using topics. Which topics are mentioned on a given page? […]


Create biased random test data in VBA

Today’s post is a quick function for creating biased randoms from a list of items and weights. You might need this to create some test data, where the outcomes are not completely random.   Example […]


Digest authentication and Google Apps Script

The other day I was looking around for an example of how to do digest authentication in Google Apps Script (or even plain javascript). I found plenty of theoretical discussions on it, but no actual […]


parse.com and d3.js mashup

Today’s post pulls together a number of concepts I’ve been playing around with lately. As usual my source data and post theme is based on data associated with color schemes – pantone, paint colors etc […]


Connections in electoral data – D3 and VBA follow on from oUseful post

Yesterday I showed how to do some data wrangling in VBA and Google Apps Script that Tony Hirst on his oUseful blog had done using scraperwiki, Open refine plus various APIs. Today he posted a quick analysis using […]


Mashing up electoral data – follow on from oUseful post

I just saw a great post by Tony Hirst on his oUseful blog where he nicely laid out how to use Open refine plus various APIs to research which candidates were standing for election in […]


Finding nearest match and other palettes in other fixed color schemes

Color scheme UI I posted about a color scheme explorer app the other day. Given a specific color, it will find – in a given color scheme such as dulux paint colors, the nearest 5 […]


Parse.com and ScriptDB performance comparison

Lately I’ve been doing a lot of posts to do with messing around with color. I’m using a selection of technologies such as scriptDB, Parse.com, jQuery promises, Google Apps Script, Google Spreadsheets, Google Visualization API and […]


More playing around with color, parse.com, scriptDb and Google Apps Script

API for comparing colors I continue to find the topic of comparing colors a fascinating one. As an experiment to see if I could create a REST API serving up JSON and JSONP from a […]


Very interesting GAS performance results – run locally using htmlservice

A little while ago, I published an item on GAS performance, showing that a complex calculation test would take about 100 times as long on GAS as the same thing in regular javascript running locally […]


Executing Google Apps Script Code directly in javascript – GAS as a CDN

As you know the language of Google Apps Script is javaScript. So you probably have a lot of useful code buried away there, that could be used in web apps. One solution is to copy […]


Google Apps Script “execution time exceeded” woes

Just how slow is Google Apps Script ? I’m a big fan of Google Apps Script, but I’m really fed up of seeing “Execution time exceeded”. Obviously data access times can be unpredictable, and although it […]


Google Apps Script Color Space Conversions.

In Google Apps Script Color functions I introduced a bunch of functions to manipulate various color spaces from GAS. This was a migration from the same thing in VBA. I extended this to include additional color […]


Automatic documentation from VBA – including function arguments

In documenting VBA procedures automatically I showed how to create web pages that documented your VBA projects. I’ve updated that now to also include a popup showing the detail of function arguments too. This page was automatically […]


Using jSon/javaScript like structures in VBA

jSon /VBA functions have always been the most popular topic on the Excel Liberation site and forum. The interesting part about this though is not so much about parsing and stringifying jSon data (which after all is […]

Full site map here