logo
search
File Sharing Problems

How to Fix Missing File URLs in Excel Embed Code (src="?")

John WilsonJohn Wilson Oct 1, 2026 870 views

Question details

Users are encountering an issue where the iframe embed code for an Excel file generated from OneDrive or SharePoint contains a missing URL.

How to Fix Missing File URLs in Excel Embed Code
Product
Microsoft Excel (Web)
Device & OS
not provided
Scenario
Generating an iframe embed code to share or display an Excel workbook on a website or portal.
Observed behavior
The generated iframe code has an empty or broken source attribute (src="?"), causing the embedded workbook to fail to display.
Before you start

Ensure your Excel workbook is saved and fully synced to OneDrive or SharePoint, and verify that your organization's sharing policies allow external embedding.

Solution 1Recommended

Generate Embed Code from Within Excel for the Web

The most reliable method to get a complete iframe URL is to open the file first, rather than using the OneDrive context menu.

A known bug introduced in recent OneDrive updates causes the embed URL to drop out when generated directly from the file list view. Opening the document in the web editor forces the system to generate a robust, working URL.

1
Open your OneDrive or SharePoint online

Navigate to the folder where your target Excel workbook is stored.

2
Open the workbook

Click on the Excel file to fully open it in the Excel for the Web application.

3
Access the Embed menu

In the top ribbon, navigate to File, select Share, and then click Embed.

4
Copy the iframe code

Customize your embed options (such as selecting specific ranges or hiding gridlines) and copy the provided iframe code from the generation box.

Generate Embed Code from Within Excel for the Web
Avoid Right-Clicking in OneDrive: Generating the code by right-clicking the file in OneDrive and selecting 'Embed' may result in the src='?' bug. Always open the file first.
Free Microsoft Office alternative

Switch to WPS Office for Seamless File Sharing

Experiencing bugs with Microsoft Office updates or OneDrive embedding? Try WPS Office. It provides a lightweight, free alternative with highly compatible formats and straightforward sharing tools without the hassle.

  1. 1. Download and install: Get the free installation package from the official WPS website and install it on your device.
  2. 2. Open your spreadsheet: Launch WPS Spreadsheet and open your existing Excel (.xlsx) workbook.
  3. 3. Share with ease: Click the Share button in the top right corner to generate a secure, reliable sharing link for your document.
Fully compatible with Microsoft Excel formats (.xlsx, .xls, .csv).Easy file sharing through secure web links with customizable permissions.Lightweight application that runs smoothly on Windows, Mac, and Linux.Familiar user interface requires no learning curve to migrate.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel embed code suddenly show src="?" instead of a URL?

This usually occurs due to a glitch introduced in a recent OneDrive platform update (commonly reported after July 2024), especially when generating the embed code directly from the OneDrive file list via right-click instead of opening the file first.

Do I need special permissions to embed an Excel file?

Yes, the file must be stored in OneDrive or SharePoint, and the sharing settings must allow anonymous or public viewing, depending on the environment where you are embedding the iframe.

Can I manually fix the src URL in the iframe?

If you know the correct guest access web link for the file, you can sometimes manually insert it into the src attribute with '&action=embedview' appended, though generating it directly from Excel for the Web is the most reliable method.

Will this bug affect embedded files that were generated previously?

No, previously generated and implemented iframe codes usually contain the correct URL strings and will continue to work. This issue primarily affects the generation of new embed codes.