How to Fix Missing File URLs in Excel Embed Code (src="?")
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.

- 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.
Ensure your Excel workbook is saved and fully synced to OneDrive or SharePoint, and verify that your organization's sharing policies allow external embedding.
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.
Navigate to the folder where your target Excel workbook is stored.
Click on the Excel file to fully open it in the Excel for the Web application.
In the top ribbon, navigate to File, select Share, and then click Embed.
Customize your embed options (such as selecting specific ranges or hiding gridlines) and copy the provided iframe code from the generation box.

Try an Alternative Browser or Clear Cache
If the OneDrive interface fails to generate the code even when the file is open, browser caching issues might be the cause.
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. Download and install: Get the free installation package from the official WPS website and install it on your device.
- 2. Open your spreadsheet: Launch WPS Spreadsheet and open your existing Excel (.xlsx) workbook.
- 3. Share with ease: Click the Share button in the top right corner to generate a secure, reliable sharing link for your document.

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.




