Forum Discussion
OneDrive no longer creating functional iframe sharing links
I've noticed that none of the excel spreadsheets I have on one drive that I had shared are working any longer. No frame appears. After banging my head against the problem, I selected one sheet, deleted it, uploaded a fresh copy and shared it via link for view only. Then, inside the sheet I shared one of the tabs in an embedded iframe. That has the exact same failure to show anything.
The permissions on the file seem correct. Anyone with the link should be able to view it, but nothing seems to work. What am I missing?
5 Replies
Your permissions may be correct, but a view-only sharing link is not automatically a valid Excel embed source. Regenerate the iframe using Excel for the web’s Embed action rather than copying the normal Share link. For a work or school workbook, first confirm that the sharing link opens in a private browser window without an unauthorized sign-in request. Then create embed code and test it on a minimal page before restoring it to the original site. If private access fails, the tenant’s external-sharing policy or link type is the blocker. If the workbook opens directly but the frame stays blank, check whether the host page blocks Microsoft 365 frames through its content-security policy, and test without browser extensions. Because several embeds stopped together, check Microsoft 365 service health. If generated code also fails on a minimal page, open a support case with the tenant, workbook URL, and failure time.
- terrymixonCopper Contributor
As I just stated in a reply below, I did use the File → Share → Embed method. The URL alone doesn't load in a private window, but while the icon at the top of the tab showed it was an excel file, nothing actually loaded. The file is hosted on my own server. Microsoft 365 service health shows OneDrive is operational.
I'm not sure what you mean by tenant. My hosting service?
- NikolinoDEPlatinum Contributor
Your OneDrive/Excel iframe problem is almost certainly due to Microsoft’s change in how Excel files can be embedded. The old method of using a standard share link inside an <iframe> no longer works reliably. Microsoft now requires you to use a dedicated embed code generated from within Excel Online.
What’s going wrong
- A normal Share → Copy link URL (e.g., https://onedrive.live.com/view.aspx?resid=...) is not designed for iframes anymore. It may be blocked by security headers (X-Frame-Options or Content-Security-Policy) or simply not return the embeddable viewer.
- The correct URL for embedding contains /embed? and specific parameters like em=2. Without those, the iframe remains blank.
The correct fix
- Open your Excel file in Excel Online (via OneDrive in the browser).
- Go to File → Share → Embed.
- Click Generate to get the full <iframe> code.
- Copy that entire code and paste it into your website or HTML.
That code will look something like this:
<iframe width="600" height="400" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?resid=YOUR_RESID&authkey=YOUR_AUTHKEY&em=2&wdAllowInteractivity=False&wdDownloadButton=True"></iframe>
The key difference is the src contains embed instead of view, and includes em=2 (or similar). This tells Microsoft to serve the embeddable version of the workbook.
Why your fresh-file test failed
You uploaded a new copy, shared it correctly, and even tried embedding a specific tab. But you likely still used a share link rather than the Embed option. The permissions were fine; the URL was just wrong for iframes.
Important caveat: embedding a specific sheet/range may still break
Even when you use the correct Embed feature, the parameter Item= (used to display only a particular worksheet or range) has had reported issues recently. If your iframe is blank only when you try to embed a specific tab, but works when you embed the whole workbook, that’s a known Microsoft bug. Try embedding the whole workbook first to see if that works.
How to diagnose further
If the correct Embed code still shows a blank iframe, do this test:
- Copy the src URL from the generated iframe code.
- Open that URL directly in an Incognito/InPrivate window while logged out of Microsoft.
- Note what happens:
- A. Excel appears normally → problem is with your website (CSP, iframe restrictions).
- B. Login prompt → sharing permissions are not set to “Anyone with the link”.
- C. Error message → the embed URL or file is problematic.
- D. Blank page → Microsoft’s embed service may be down or the URL is malformed.
- E. Workbook appears but wrong sheet → Item= parameter issue.
- F. Something else → describe it.
Also tell us whether you’re using OneDrive Personal or OneDrive for Business/SharePoint, because the hostname and behavior differ.
Bottom line
Always use File → Share → Embed to get the iframe code. That is the supported method. If that still fails, the problem is either with a specific sheet embedding (Item=), Microsoft’s service, or your website’s security settings—not your file permissions.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.
- terrymixonCopper Contributor
I use OneDrive Personal. I did use File → Share → Embed. The generated iframe code is this:
<iframe width="750" height="1000" frameborder="0" scrolling="no" src="https://1drv.ms/x/c/0c7d762a264cd7b8/IQSv7U_9OY41TZgbzbo2m8ytAbNt0Cj0PfVNnoihwjcu_Vo?em=2&wdAllowInteractivity=False&wdHideGridlines=True&wdHideHeaders=True&wdDownloadButton=True&wdInConfigurator=True&wdInConfigurator=True"></iframe>
I did change the width and height. I pasted the URL into a fresh window with no options, but nothing loaded.
The website is mine, but the fact that the sheet won't load with just the URL leads me to believe that isn't the issue. I don't believe this sheet is sharing a specific tab.
- Masonator12Copper Contributor
I have pretty much the same issue, but using powerpoint embed URLs . I have embedded about 40+ different URLs to Powerpoint presentations on my GoogleSite using the embed iframe code which I had previously generated from each file. Up until recently everything worked fine and all powerpoints showed up in the browser. Since ca 1 week not a single one of these powerpoints shows up anymore - only blank space. I have thousands of people around the world using these resources for teaching. It is very frustrating. I also have re-generated several of these embed codes, but the problem persists. It clearly seems to be some sort of Microsoft service issue, because everything worked smoothly before.