Subscribe

Generating QR Codes in Google Sheets

✍️

Automating QR code generation in Google Sheets

23 May, 2021 · 2 min read

Being a developer comes down to using the right tool for the right job. And sometimes, it can be a Google sheet or Excel sheet that can automate a simple task for you.

Have you ever needed to generate QR codes from a whole list of URLs, for instance?

Well, Google has your back on that. Today, we’ll use Google Sheets and Google Charts to generate QR Codes!

Generating QR Codes in Google Sheets

Generating a QR code with Google Charts

Google Charts is a fantastic tool that can generate several types of charts for us. One of the charts we can generate is a QR code.

The benefit of this is that we get a dynamic endpoint where we can change the encoded QR element to be something variable.

Read more on the Google Chart QR Code

If you follow along with my article, this is the end URL we will be using.

https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=https://daily-dev-tips.com

Where the variables we use are:

  • chs: Chart size, we defined a 200x200 square
  • cht: Chart type, in our case, QR
  • chl: This is the data we want to encode

Using that URL as an image, we get the following result.

Daily dev tips QR code

Google Sheets dynamic QR codes

Now that we know about creating QR codes let’s put this into action as we generate them dynamically in Google Sheets.

Open up new Google Sheets and fill out column A with random websites.

Then in column B, we will add the following formula.

=IMAGE("https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl="&A1&"")

Then we can drag this formula down to the other cells!

Make the rows a bit bigger so you can see the image correctly. And that’s it. We now have a dynamic QR generator in Google Sheets.

You can view the Google QR Sheet here.

Thank you for reading, and let’s connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Spread the knowledge with fellow developers on Twitter
Tweet this tip
Powered by Webmentions - Learn more

Read next 📖

I wrote 1000 articles, what’s next?

22 Dec, 2022 · 3 min read

I wrote 1000 articles, what’s next?

Too much, and yet not enough

7 Dec, 2022 · 3 min read

Too much, and yet not enough

Join 2097 devs and subscribe to my newsletter