logo
search
Function Problems

How to Create a Dynamic QR Code from an Excel Cell Value

Camila MilosovichCamila Milosovich Oct 10, 2026 869 views

Question details

The user wants to generate dynamic QR codes based on cell values using an online image-generation service, and needs help resolving potential connection errors.

How to Create a Dynamic QR Code from an Excel Cell Value
Product
Excel
Device & OS
not provided
Scenario
Generating dynamic QR codes from spreadsheet data using the IMAGE function and a supported API URL.
Observed behavior
The user observes that using certain services like the Google Chart API may return a #CONNECT! error due to the service being blocked, incompatible, or unavailable.
Before you start

Ensure you have an active internet connection and verify that your spreadsheet software is permitted to download external content and use connected experiences.

Solution 1Recommended

Use the IMAGE Function with a Supported QR Code API

Generate a dynamic QR code by combining Excel's IMAGE function with a reliable online QR code generator URL.

Since the IMAGE function pulls data from the web, you must use a working QR code API service. If you were using the deprecated Google Chart API, it is recommended to switch to an alternative like api.qrserver.com.

1
Prepare the source data

Type the text or URL you want to convert into a QR code in a specific cell, for example, cell A2.

2
Enter the IMAGE formula

Select a blank cell and input the formula combining the API and your data: =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&ENCODEURL(A2))

3
Adjust cell dimensions

Resize the row height and column width of the cell containing the formula so the generated QR code displays clearly without distortion.

Use the IMAGE Function with a Supported QR Code API
Use ENCODEURL: Always wrap your cell reference with the ENCODEURL function to ensure special characters and spaces in your data are properly formatted for the web request.

Create Dynamic QR Codes Seamlessly with WPS Spreadsheet

WPS Office Spreadsheet provides excellent compatibility with advanced formulas and external data fetching, allowing you to easily generate dynamic QR codes from cell values using the IMAGE function.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the file containing the data you want to convert to QR codes.
  2. 2. Input the IMAGE formula: Select a blank cell and enter your IMAGE formula utilizing a valid QR code API URL, referencing your target data cell.
  3. 3. Format the output: Adjust the row and column dimensions so the dynamically generated QR code fits perfectly inside your spreadsheet.
100% compatible with Microsoft Excel formulas including IMAGE and ENCODEURLFree, lightweight, and fast spreadsheet processingUser-friendly interface for handling complex data and external linksCross-platform support for Windows, Mac, and mobile devices
microsoft office alternative - wps office

Frequently Asked Questions

Why does my IMAGE function return a #CONNECT! error?

A #CONNECT! error occurs when the spreadsheet cannot access the provided URL. This happens if the URL is incorrect, the external service is offline (like the deprecated Google Chart API), or your Trust Center privacy settings are blocking external content downloads.

Can I generate a QR code without using an internet connection?

No, using the IMAGE function combined with a web API requires an active internet connection. To generate QR codes completely offline, you would need to use specialized add-ins, fonts, or VBA macros.

Which QR code APIs work best with the IMAGE function?

Since the Google Chart API is no longer reliable for this purpose, popular and free alternatives include the QR Server API (api.qrserver.com) and QuickChart API (quickchart.io). Both work well with the standard IMAGE formula syntax.