Cannot generate embed view for excel workbook to allow guest access

Charles Huang 26 Reputation points
2021-11-18T07:57:03.427+00:00

Hi Team,

The project I'm working on requires to display an embed view of our excel workbook on one of our web pages so that when a visitor lands on the site, they can use the excel sheet to do some basic budget calculating. In the excel workbook we have our formulas configured so the visitor only needs to change the input in cell (for example, cell A12), and the budget result would be calculated and displayed in another cell (for example, cell B12).

We have the business subscription of Microsoft 365, and the excel workbook is hosted on our onedrive, but we cannot generate a embed view that does not require sharepoint sign in.

Steps to reproduce:

  1. Open excel workbook from our one drive, launches into microsoft 365 excel
  2. Click on File -> Shared -> Embed View
  3. Embed code is generated
  4. I paste this embed code snippet onto my website, deploy
  5. Visit the page with the embed code
  6. Embed View is showing "SharePoint Online" and requests me to sign in.

I have read the official support document here: embed-your-excel-workbook-on-your-web-page-or-blog-from-sharepoint-or-onedrive-for-business-7af74ce6-e8a0-48ac-ba3b-a1dd627b7773 on how to embed the view for guest access, the snippet generated from the support document is different from what I could generate, the one from support document has guestaccesstoken in the url but mine does not. And I could not find where I could untick the box "Require Sign In".

Can I please get some help from Microsoft team and hopefully get this sorted?

Thank you!

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,174 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,266 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,755 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Charles Huang 26 Reputation points
    2021-12-14T09:45:47.127+00:00

    Hi @CaseyYang-MSFT ,

    Today I was doing some cross browser comparison and I found something that might help further this investigation.

    I have now hosted a very minimal webpage with only the embed view code in it: https://www.clip-on.com.au/test.html

    Steps to reveal the result (same across all browsers)

                 | Chrome | Edge | Firefox | Safari  
    -------------+--------+------+---------+--------  
    Normal       |    1   |   1  |    1    |   0   |  
    -------------+--------+------+---------+-------+  
    Incognito    |    0   |   1  |    1    |   0   |  
    -------------+--------+------+---------+-------+  
    

    1 means the excel sheet can be viewed
    0 means the excel sheet cannot be viewed, instead a "sign in" button is displayed

    Upon digging a little further, whenever a "sign in" is displayed, the network activity always has 4 consecutive failed calls:

    1. POST /contextinfo (response 403)
    2. POST /contextinfo (response 403)
    3. GET /Language (response 403)
    4. POST /contextinfo (response 403)

    All of these http calls were made from loginapp.js, which were loaded after a series of 302 redirections.

    Whereas whenever the excel sheet can be viewed straightaway, no 302 redirections can be seen in the network activities.

    I have no idea how and where the discrepancy happens, if you or anyone who's watching this thread has any idea about it, please do share it with me as I'm very desperate to solve this and make my project live.

    Thank you very much for your help and time.

    Regards,
    Charles

    1 person found this answer helpful.

  2. CaseyYang-MSFT 10,456 Reputation points
    2021-11-19T03:15:59.55+00:00

    Hi @Charles Huang ,

    In this article Embed your Excel workbook on your web page or blog from SharePoint or OneDrive for Business, you have to upload the Excel file to SharePoint online library first.

    1.Upload Excel file to SharePoint online library.

    150866-1.png

    2.You have to enable externel sharing settings in SharePoint admin center.
    Organization level: SharePoint admin center > Policies > Sharing > set "Content can be shared with" as "Anyone"

    150891-2.png

    Site level: SharePoint admin center > Sites > Active sites > click you site > Policies > Edit External sharing > select Anyone

    150809-3.png

    For Reference:
    Manage sharing settings
    Change the sharing settings for a site

    3.Copy excel file link and add URL parameter.

    150758-4.png

    Click "Anyone with the link can view"

    150872-5.png

    Enable "Allow editing" > Apply

    150759-6.png

    Now you get the excel file link, you could add the URL parameter "action=embedview" at the end of the URL string to present the workbook as an embedded workbook. You could add some other url parameters like the article shows.

    The url will be like: https://xxx.sharepoint.com/:x:/s/xxx/EeDrKzV97KhDsL7kfrf7dcoBUJ4ENPCRCM3nbR4fVrcW3Q?e=xX6DPh&action=embedview. Per my test, users could edit the file without sign in.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.