How to Create a Dynamic QR Code from an Excel Cell Value
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.

- 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.
Ensure you have an active internet connection and verify that your spreadsheet software is permitted to download external content and use connected experiences.
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.
Type the text or URL you want to convert into a QR code in a specific cell, for example, cell A2.
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))
Resize the row height and column width of the cell containing the formula so the generated QR code displays clearly without distortion.

Troubleshoot the #CONNECT! Error
Resolve issues when the IMAGE function fails to load the external QR code and returns a #CONNECT! error.
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. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the file containing the data you want to convert to QR codes.
- 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. Format the output: Adjust the row and column dimensions so the dynamically generated QR code fits perfectly inside your spreadsheet.

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.




