Ramblings

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.

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 to 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 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

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…

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 G+ communities, github, to my tutorial site or my YouTube…

0 comments

How about free VMs 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…

0 comments

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…

0 comments

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….

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

Null should mean something

It’s a common pattern in JavaScript to do this to assign a default value to a variable : var theThing = someThing || defaultThing; In…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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….

0 comments

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…

1 comment

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. When a script is deployed as a…

0 comments

Using universal analytics to track your Google Apps Script library usage

In Analytics and GAS libraries I described how I had started to use Google Universal Analytics to track what usage was being made of Google Apps…

0 comments

Identifying duplicates on Drive

The problem with Drive is that it’s really easy to have loads of files with the same name spread around in multiple folders on Drive….

0 comments

Zipping to make stuff fit in cache or properties service.

If you use caching in Apps Script (and you should), you might hit the 100k limit on cache sizes. I’ve written about how to get…

0 comments

Creating a key digest to use for a cache key or to compare content

Creating a crypto digest of some content is a neat trick used by github (and torrent sharing sites) to know if the content of two…

0 comments

Counting script and library usage

One of the problems of measuring script or library usage is the identification of returning users. As you know email addresses or some other identification…

0 comments

From Xml to JSON

In Convert JSON to XML I showed how to make XML from JSON. Here’s the opposite. It could be a little more all encompassing by…

0 comments

Convert JSON to XML

There are a few examples of XML to JSON conversion around, but not so many going the the other way. In case you need to…

0 comments

Generating test data for sheets and tables

Sometimes you need to make up some random data for a sheet or a docs table just for testing in some volume. I use this…

0 comments

Including the stack in custom errors

If you throw a custom error, it can be hard to track down where it came from if you’re using a common function. In Reporting…

0 comments

Why Base64

In this article we’ll take a look at Base64, what it is and why we use it. Although there are Base64 encoding and decoding available…

0 comments

Create sha1 signatures with apps script

If you use Github (or bit torrent sites), you’ll notice that there is sometimes a code called a sha used to reference files. This is…

0 comments

How to determine what kind of object something is in Apps Script

If you liked Reporting file, function and line number in Apps Script, you’ll probably also like this one. This shows how to get some properties…

0 comments

Reporting file, function and line number in Apps Script

If you are using the Logger extensively, it’s sometimes hard to track where the log message is coming from. It would be useful to display…

0 comments

From notes to frequencies and back again

This is part of a bigger project that I’ll write up at some later date. These functions from it might be of some use to…

0 comments

Google cloud storage and CORS

This is part of the writeup on Using Google Cloud Storage with Apps Script. By now you should have completed all the steps in Setting…

0 comments

GcsStore examples

This is part of the writeup on Using Google Cloud Storage with Apps Script. By now you should have completed all the steps in Setting…

0 comments

Using the service account to enable access to cloud storage

0 comments

Enabling APIs and OAuth2

0 comments

Setting up or creating a console project

0 comments

GcsStore overview – Google Cloud Storage and Apps Script

This is part of the writeup on Using Google Cloud Storage with Apps Script. By now you should have completed all the steps in Setting…

0 comments

Transform dates for add-on transfer

If you getValues from a spreadsheet, and those values contain dates, and you expect to be able to send them to an add-on, then you’ll…

0 comments

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…

0 comments

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…

0 comments

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,…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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,…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

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…

0 comments

VBA procedures for CIE LabLch and HSL color scheming

In playing around with color in VBA I introduced a bunch of functions to manipulate various color spaces from VBA. Digging into the whole topic a…

0 comments
Full site map here