Excel IMAGE function cannot generate QR code with API

I used to create mass of qr codes by IMAGE function with API (google api), my function is:

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

But today, Excel cannot generate QR Code, it shows error: #CONNECT, i tried API of QR Server but still didn't work

Please help me

|

Hello,

Thank you for posting in Microsoft Community.

The #CONNECT! error in Excel when using the IMAGE function to generate QR codes suggests that Excel is unable to connect to the specified URL to retrieve the image. This could be due to several reasons:

  • Network Issues: There might be network issues preventing Excel from accessing the API. This could be on your end (like a firewall or network policy blocking the connection), or on the server's end.

  • API Limitations: Some APIs have limitations on the number of requests that can be made within a certain timeframe. If you are generating a large number of QR codes, you may have hit a rate limit.

  • Invalid Data: Ensure that the data in cell A2 does not contain any special characters that need to be URL-encoded. Special characters can break the URL if not properly encoded.

By the way, does this issue happen in a specific Excel file or different files?

Thanks for your time and cooperation! Have a nice day!

Sincerely,

Tina | Microsoft Community Moderator

• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

=image("https://e.anyoupin.cn/pdo/eh/a10/create_qr.php?value=JLC2023070694313738")

=image("https://e.anyoupin.cn/pdo/eh/a10/create_qr.php?value=" & A2)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

This happens in every excel files. May be it's API limitations as you said.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Apparently it has been depreciated.

I haven't found a workaround :(

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You can use this other API

They have parameters you can use similar to the old Google Chart API.

data

QR Code data, needs to be HTML encoded

errorcorrection

Error correction level: L, M, Q or H

color

Hex color code for the QR symbol

backcolor

Hex color code for the background

istransparent

Transparency of the background: True or False

quietzone

Width of the whitespace around the QR code

quietunit

Measurement unit for the quiet zone: mm (default), in (inch), mil (mils), mod (modules) or px (pixel)

codepage

Code page used for encoding data. Choose between UTF8 (default), Cyrillic and ANSI

dpi

Resolution (DPI - dots per inch) of the QR code image [96..600]

size

Size of the QR code: small, medium or large

method

Method used for returning the created QR code image (PNG): BASE64 (BASE64 encoded byte array for AJAX calls), Image or Download

Here's an example from my workbook where AD2 is the cell with data to create the QR Code

=IMAGE("https://qrcode.tec-it.com/API/QRCode?errorcorrection=M&quietzone=5&data="&AD2)

I only cared about the error correction parameter and quietzone (border) parameters, it works without declaring every parameter.

I hope this helps other transition from the google API

It looks like peiyezhu has offered another option although I haven't tested it.

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

i could not get the one from peiyezhu to work

but this one worked perfectly for me. Thanks

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 23, 2024 Views 1,586 Applies to: