logo
search
Function Problems

Fix Excel Web IMAGE Function #CONNECT or #BLOCK Errors

Natalie TaylorNatalie Taylor Oct 8, 2026 875 views

Question details

The user is attempting to display a OneDrive image in Excel for the Web using the IMAGE function, but the cells return #CONNECT! or #BLOCK! errors.

How to Fix Excel Web IMAGE Function #CONNECT! and #BLOCK! Errors
Product
Excel for the Web
Device & OS
not provided
Scenario
Using the IMAGE function to embed and display pictures stored in a OneDrive account within an online Excel spreadsheet.
Observed behavior
Excel for the Web fails to retrieve the image and returns a #CONNECT! or #BLOCK! error instead of rendering the picture, due to security and access restrictions.
Before you start

Verify that your OneDrive image URL is set to 'Anyone with the link can view' to ensure it does not require an active login session to access.

Solution 1Recommended

Modify OneDrive Link to a Direct Download URL

Standard OneDrive links point to a webpage viewer rather than the raw image file, which causes the IMAGE function to fail. You must extract a direct link.

Excel for the Web requires a direct, publicly accessible URL that ends in an image extension (like .jpg or .png) to render the picture. Generating a standard share link often results in a #CONNECT! error because it loads Microsoft's web interface instead of the image data.

1
Generate a sharing link

Open OneDrive, right-click the image you want to use, select 'Share', and copy the sharing link. Ensure permissions are set to public viewing.

2
Extract the embed link

Instead of the standard share link, go to the image file in OneDrive, click 'Embed' from the top menu, and copy the URL specifically provided inside the HTML embed code.

3
Update the IMAGE formula

Go back to Excel for the Web, select your cell, and type =IMAGE("paste_your_direct_embed_link_here"). Press Enter to see if the image renders.

Modify OneDrive Link to a Direct Download URL
Web App Limitations: Due to strict Cross-Origin Resource Sharing (CORS) security policies in Excel for the Web, even direct OneDrive links may still result in a #BLOCK! error in certain browser environments.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Management

If Excel for the Web's strict security limitations are preventing you from effectively using images in your spreadsheets, consider switching to WPS Office. It provides a robust, lightweight desktop application with high compatibility and hassle-free local image insertion.

  1. 1. Download and install: Visit the official WPS Office website and download the free suite for your operating system.
  2. 2. Open your spreadsheet: Launch WPS Spreadsheets and open your existing .xlsx file directly.
  3. 3. Insert images effortlessly: Use the 'Insert > Picture' feature to reliably embed images without dealing with complex cloud URL restrictions.
Completely free and lightweight office suiteHighly compatible with Microsoft Excel (.xlsx) formatsEasily insert and manage images within spreadsheets without #BLOCK! errorsFamiliar user interface for a quick and seamless transition
microsoft office alternative - wps office

Frequently Asked Questions

What does the #CONNECT! error mean in Excel for the Web?

A #CONNECT! error indicates that the IMAGE function cannot reach or retrieve the image from the provided URL. This usually happens if the link requires authentication, points to a web viewer page instead of a raw image file, or if there is a typo in the URL.

Does a #BLOCK! error mean my OneDrive image has been deleted?

No. A #BLOCK! error means the image exists, but Excel for the Web's security settings or privacy policies are preventing it from being downloaded and displayed in the browser. It is a security limitation, not a missing file issue.

Can I insert images directly into cells instead of using a URL formula?

Yes. Instead of relying on the IMAGE function and external OneDrive URLs, you can navigate to the Insert tab, select Pictures, and upload an image directly from your local device into the spreadsheet.