Query Google Sheets with SQL

Johannes NaylorJohannes Naylor
2 min read

So when I worked at my university’s IT department during college, getting an actual database required a lot of red tape. Because of this, it was very common for us to build apps that used Google sheets as a database (which is really fkn cursed). I wish this were a joke but everything was backed by some random Google sheet with like 80k rows in it. For example, I built a little script for setting up new desktop computers in computer labs. We needed a single binary that would run on all the machines and that would use google sheets as a DB.

As much as I hate this, I have a feeling it’s not uncommon so I vibe-coded a little Go lib for it called sheetsql (https://github.com/jonaylor89/sheetsql).

Is this unique?

probably not, I’m sure there’s a million of these

Can this be used in production

if you’re using google sheets in production then does it really matter?

Why Go?

  • Single binary: no runtime dependencies, ship it and forget it.

  • Cross-compiling: build for Linux, Windows, macOS with ease. ideal for mixed‑environment labs.

Setup: Google Sheets creds

  1. Create a Google Cloud service account, download its JSON key.

  2. Share your sheet with the service account email (xxx@yyy.iam.gserviceaccount.com).

  3. Configure the Client to point at the sheet ID and keyfile.

Try it out

isn’t it beautiful

In short: if you ever need a quick SQL‑like layer on top of Sheets, sheetsql is a solution. no red tape, no DB admin required


some useful-ish references:

0
Subscribe to my newsletter

Read articles from Johannes Naylor directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Johannes Naylor
Johannes Naylor