File Sharing Problems

Embed SharePoint Online Files in an External Website

Amos GikundaAmos Gikunda Nov 20, 2026 868 views

Question details

The user needs to display a SharePoint Online document or workbook inside an external website.

Embed SharePoint Online Files in an External Website
Product
SharePoint Online and Microsoft Office for the web
Device & OS
not provided
Scenario
A file stored in SharePoint Online needs to be embedded in an external website using an iframe.
Observed behavior
The file may not display in the iframe when guest access, sharing settings, or organization policies restrict access.
Before you start

Confirm that you can open the file in Office for the web and have permission to share it. Ask your SharePoint administrator which external sharing options are approved for the site.

Solution 1Recommended

Generate an embed code in Office for the web

Use the file's embed option when it is available for the file type and your organization's policies allow the intended audience to view it.

1
Open the file

In the SharePoint document library, select the document or workbook and open it in Office for the web.

2
Generate the embed code

Select File > Share > Embed, if available, and follow the prompts to generate the embed code.

3
Add the iframe to your website

Copy the generated code and paste it into the external website's HTML or embed component.

4
Test viewer access

Open the published page in a separate browser session and check whether an intended viewer can see the file or is prompted to sign in.

Generate an embed code in Office for the web
Embed availability and access: The Embed option may not be available for every file type or organization. An embed code does not bypass SharePoint permissions; viewers must have the access required by the file and tenant policies.
Free Microsoft Office alternative

Edit Office documents and workbooks with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Office files. Its format compatibility helps you move existing documents and workbooks into your workflow. SharePoint embedding and access policies still need to be managed in Microsoft 365.

Edit documents and workbooks that you may later share onlineCompatible with Microsoft Word DOCX and Excel XLSX formatsFamiliar interface for an easier transition from Microsoft OfficeFree and lightweight office software
microsoft office alternative - wps office

Frequently Asked Questions

Why does my SharePoint iframe ask visitors to sign in?

The file or site may require authentication. Check the file's Share settings and ask your administrator whether the intended visitors are allowed guest access.

Where can I find the embed code for a SharePoint workbook?

Open the workbook in Excel for the web and look for File > Share > Embed. Availability can depend on the file and your organization's settings.

Can I put an Anyone sharing link directly into an iframe?

Not necessarily. An Anyone link controls access but may not be a supported iframe URL. Generate an embed code in Office for the web when the option is available.

Who can change external sharing settings?

A SharePoint administrator can review organization settings under Policies > Sharing and site settings under Sites > Active sites in the SharePoint admin center. Changes should follow the organization's security policy.