Forum Discussion
Embed Excel Workbook From SharePoint
I'm attempting to embed an Excel workbook in a website from a SharePoint Online team site. I'm using the instructions posted here:
I am able to successfullly embed a workbook using a view link - no sign in required, however; it seems that the embed parameters don't work out of SharePoint or OneDrive for Business. I've tried hiding gridlines, headings, enabling the download workbook option, etc, and I have yet to get a single one of them to work. The embed features do work as expected if I put the files in OneDrive (Consumer). I can't find a lot of information about this issue.
Has anyone else come across this issue? Perhaps the embed parameters are not supported out of OneDrive for Business and SharePoint?
- Andrew GilleranSteel Contributor
Not really clear on where you have a problem. You have to upload the Excel file to a document library on your site. Then on a page or create a new page, add the Excel Web Access web part and configure it from there using that Excel file.
Here are 2 tutorials which might help:
And a different variation from Laura Rodgers which might be of use to you:
- Riley HaleBrass Contributor
I'm not trying to add a web part. I'm attempting to take a hosted (in SharePoint document library) Excel workbook and embed it in an external website. In the Consumer OneDrive service there is actually a right-click context button that can generate your embed code for you in javascript or html.
My question had to do with the supported parameters when embedding a workbook through an iFrame (see the link I provided in my original post). I'm finding that the parameters don't have any effect on the content rendered through the iFrame. As I mentioned earlier, the parameters work in OneDrive Consumer but not SharePoint Online or OneDrive for Business.
- Pramod NathanCopper ContributorCan you check the parameters are being sent by using a tool like Fiddler?
- Karen Ellis-WhiteCopper Contributor
There is no copy embed link on the pop-up menu for the Excel file. Instructions for embed a view (https://support.office.com/en-US/article/embed-a-view-of-your-calendar-804e1845-5662-487e-9b38-f96307144081) say ":in OneDrive, right-click the workbook, and then click Embed. Embed is not a selection in the pop-up menu when u sing OneDrive for Business
- Deleted
I'm experiencing the same problem too. Here is my iframe embed code:
<iframe frameborder="0" scrolling="no" width="1300px" height="800px" src=" https://appriver3651017602-my.sharepoint.com/personal/anthea_crowinsight_com/_layouts/15/guestaccess.aspx?docid=1b17dabec9a1f49b187468da6ff7a95b3&authkey=AZFtRXQsUx8qGA3lwZ_LvhU&action=embedview&wdDownloadButton=True&wdbipreview=True&wdAllowInteractivity=True&wdHideHeaders=True&wdHideSheetTabs=True&wdHideGridlines=True&ActiveCell=O22">
I am able to embed the file, but you can see that the parameters are not taking effect. I have Office 365 ProPlus and OneDrive for Business. The Excel workbook I'm trying to embed in the code above is stored on my OneDrive account, and I'm using the parameters detailed on this Office Support site. I have also just activated SharePoint Online for my account and tried embedding with a new shared link, but the parameters are still not working.
Does this have something to do with the level of SharePoint access/support allowed in my subscription?
- Pramod NathanCopper Contributor
Hi Folks,
I have been able to test this and from the Fiddler analysis it looks like the request is redirected and the embedded code is stripped off. This may be a ticket to Microsoft.
Regards,
Pramod
- Karan LalaCopper Contributor
Does any one have a work around for this yet?
This is really frustrating, because what I want to do can be easily done on onedrive for consumers, but not in onedrive for business.
In onedrive for business, I can embed an excel wb in my website but viewers need to sign in to view the document. Then, following OPs link, I can embed a version which the public can view (without an account) but cannot interact with, i.e. I need the parameter wbAllowInteractivity=True to work.
Plus, isn't it soooo inconvenient that the embed function doesn't have a "don't require sign in" option, while its possible to do so?
Now, I'd be more than happy to use onedrive for consumers and call it a day, but unfortunately that has an excel wb limit of 5 mb.
- Deleted
Hi Karan,
I've been tinkering around with this and I've sort of found a way to make it work. I think Microsoft has been making updates and changes also, as the embed options are different than from when I posted in this forum a few months ago. This makes it quite hard to keep up with what works/doesn't work. But for now, my workaround seems to work.
After you've set sharing to "Everyone", click "Get link." The link that I get looks something like this: "https://hostprovidername-my.sharepoint.com/personal/myname/....guestaccess.aspx?docid=23kj4hkjbs876...&authkey=SIdslbxxoIL2jd8s"
Switch out "guestaccess" with "WopiFrame", and try the embed again. It should be available to the public now and parameters will work.
There's a different docid that is generated if you get the pre-generated embed code. It defaults to WopiFrame.aspx, but the query after it will look like this: "WopiFrame.aspx?sourcedoc={3jf890d-0s9d-298d-d9x0-9d9s87c7shdf}" This will not allow public access without signing in.
Hope this helps!
P.S. a neat parameter I discovered via the embed code options box is that you can set the default active cell. Param is ActiveCell='Sheet1'!A1
- Sean O'DonnellCopper Contributor
I ran into this issue and found this post. Not sure about permissions as I tried several things before I finally got something to work. No idea where the embed icon is on the business side of sharepoint/onedrive, but when I opened it up in Excel Online, I just selected the icon at the end of the ribbon called "Tell me what you want to do." I typed in Embed and it took me to the typical embed prompt I saw on the consumer side. I got it embedded in an external website and it looks to be working.
- officeasacCopper ContributorI realize this thread is almost five years old, but I am having the same problem now (Nov 2021) and wonder if an easy fix has been discovered.
Using MS 365 Personal, I can store an Excel file in OneDrive, generate embed code, embed it on my website and it is viewable by everyone. I've switched to MS 365 Business and now the website displays a "Sign in to Sharepoint" graphic instead of the Excel file contents.
I've been on the phone with Microsoft three times totaling five hours and they can't figure it out either. All permissions in Sharepoint are set correctly. I can go to the "Classic Sharepoint" view and indicate the file should be viewable by "everyone". The LINK to the file works, but the iframe code apparently does not allow anyone to see the Excel file contents on the webpage unless they "Sign in to Sharepoint".
Any news/updates on this would be appreciated. Thanks.- Sean O'DonnellCopper Contributor
The only way I've been able to do this and have it public facing with no password is using my personal OneDrive. I know it's not ideal but assuming you have that option, I would just go with that.
- officeasacCopper ContributorYes, thanks, I realize that is an option but, and I'm sure you'll agree, Microsoft just needs to fix this. I continue to have phone conversations with MS about it and they are mystified as to why it's not working. If it comes to it, I'm going to ask them to provide me with a (free) Personal account so this function works. (I know, "good luck with that.") I do appreciate your feedback.
- TadeoPGCopper ContributorCould you resolve that problem?