Forum Discussion

Riley Hale's avatar
Riley Hale
Brass Contributor
Jan 23, 2017

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:

 

https://support.office.com/en-us/article/Embed-your-Excel-workbook-on-your-web-page-or-blog-from-SharePoint-or-OneDrive-for-Business-7af74ce6-e8a0-48ac-ba3b-a1dd627b7773?ui=en-US&rs=en-CA&ad=CA

 

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? 

  • 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:

    https://prezi.com/3tr-hg0bykzk/sharepoint-lesson-24-how-to-display-content-of-an-excel-file-in-a-webpart/

     

    And a different variation from Laura Rodgers which might be of use to you:

    https://wonderlaura.com/2015/01/21/dynamic-excel-web-part/

    • Riley Hale's avatar
      Riley Hale
      Brass 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 Nathan's avatar
        Pramod Nathan
        Copper Contributor
        Can you check the parameters are being sent by using a tool like Fiddler?
    • Deleted's avatar
      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 Nathan's avatar
        Pramod Nathan
        Copper 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 Lala's avatar
    Karan Lala
    Copper 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's avatar
      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'Donnell's avatar
        Sean O'Donnell
        Copper 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.

  • officeasac's avatar
    officeasac
    Copper Contributor
    I 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'Donnell's avatar
      Sean O'Donnell
      Copper Contributor

      officeasac 

       

      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.

      • officeasac's avatar
        officeasac
        Copper Contributor
        Yes, 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.

Resources