Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The right WordPress method depends on what visitors must do: download a file, read a document inside the page, or work with a live spreadsheet. Use the Media Library for downloads, a document-viewer plugin for inline PDF or Office previews, and OneDrive’s generated iframe for an interactive Excel workbook.

Choose the kind of file experience you need

Approach Best for Where the file lives What visitors can do Main limitation
Media Library and file link Downloads and basic access Your WordPress site Open or download the file A link does not create a rich document viewer
OneDrive Excel iframe Interactive workbooks OneDrive Sort, filter and calculate in the embedded workbook Sharing and embed settings are controlled by Microsoft
Document-viewer plugin Inline PDF and Office previews Your site or an external viewer service Read the document in a page viewer; features vary Public accessibility, file-size, privacy and service limits
WordPress Embed block Content hosted by supported third-party services The third-party service Whatever the supported service provides Core accepts only services on its security whitelist

Add a PDF, spreadsheet or other file as a download

WordPress can manage common document and spreadsheet formats as media. This is the simplest and most private option when visitors only need the original file.

  1. In the dashboard, go to Media > Add New, or open the Media Library and select Add New.
  2. Upload the PDF, Word document, Excel workbook, PowerPoint presentation or other permitted file.
  3. Edit the post or page where the file should appear.
  4. Insert a File block (or select the uploaded item through the editor’s media picker).
  5. Choose whether the link opens in a new tab and whether to show a download button, then publish or update the page.

This creates a link to the uploaded file. It does not render every format as an in-page preview, and an Excel file linked this way is not an interactive workbook.

Why the generic Embed block may not show your file

The WordPress Embed block is intended for URLs from supported third-party services. It keeps the content hosted at that service rather than uploading it to WordPress. WordPress core maintains an internal whitelist of allowed embeddable providers for security, so pasting an arbitrary PDF, DOCX or XLSX URL will not reliably produce a viewer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the URL is rejected, use a File block for a download, a document-viewer plugin for an inline preview, or the provider’s documented embed workflow. Do not assume that adding arbitrary iframe code is safe or permitted: WordPress may filter it according to the user’s HTML capabilities and security rules.

Embed an interactive Excel workbook with OneDrive

Microsoft’s documented route for an interactive workbook is to store it in OneDrive, generate the workbook’s embed code there, and add the resulting iframe source to WordPress. Microsoft says readers can sort, filter and calculate data directly in the post, and changes saved to OneDrive are reflected in the embedded view.

  1. Upload or save the workbook in OneDrive.
  2. Open the workbook in OneDrive or Excel for the web.
  3. Use the workbook’s Embed command and generate the iframe code.
  4. Copy the generated embed code or iframe source.
  5. In WordPress, open the post or page and add a Custom HTML block, or switch to the editor’s HTML/code view where available.
  6. Paste the code, preview the page, and verify that the workbook loads and that the intended sharing permissions work for a logged-out visitor.

The workbook remains in OneDrive; WordPress displays the provider’s view. Review the OneDrive sharing setting before publishing, because the page cannot grant access that the workbook itself does not allow.

Show PDFs, Word files, Excel files or PowerPoint files inline with a plugin

Embed Any Document

Embed Any Document advertises a dedicated Document block for PDF, Word, Excel and PowerPoint files. Its listed viewer choices include Google Docs Viewer, Microsoft Office Online and a browser-native PDF viewer. The publisher also lists Plus-version connections for Google Drive, OneDrive and Box.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

According to the plugin’s WordPress.org listing, externally rendered documents must be online and reachable by the selected viewer. The listing states an 8 MB maximum for Google Docs Viewer and 10 MB for Microsoft Office Online. Treat those as the publisher’s documented limits, not universal limits for every account or provider, and verify them against the current plugin and viewer documentation before relying on them.

  1. Install and activate the current plugin from Plugins > Add New.
  2. Open the post or page and insert the plugin’s Document block.
  3. Select or enter the document source and choose the available viewer.
  4. Set the viewer dimensions, save, and test the page on desktop and mobile.

EasyEmbed

EasyEmbed’s directory listing describes shortcode embeds for PDFs, Google Docs, Google Sheets, Google Slides, Word, Excel and PowerPoint files. It supports configurable dimensions and optional dashboard management; direct URL embeds do not require that dashboard.

For direct Word, Excel and PowerPoint URLs, the listing says the document URL is sent to Microsoft’s Office Online viewer. That means the document must be publicly reachable by the viewer. A password-protected page, a private media URL or a WordPress login wall may prevent rendering, and publishing a page privately does not by itself make the document private from an external viewer.

Privacy, security and maintenance checks

  • Assume external viewers can fetch the file. Confirm exactly what URL is sent and whether the document is publicly accessible before embedding sensitive material.
  • Prefer a download for confidential files. Keep the file behind appropriate WordPress or storage access controls instead of sending it to a third-party viewer.
  • Use least-privilege editor accounts. Custom HTML and iframe capabilities can be restricted by WordPress role and may be filtered for security.
  • Keep plugins updated. Plugin features, compatibility and viewer services change. Embed Any Document’s listing records a 2026-08-07 release that fixed a stored cross-site scripting vulnerability in its bundled PDFObject library; that entry is not a complete security assessment.
  • Test the published page. Check logged-out access, mobile layout, keyboard use, loading failures and a file near the viewer’s documented size limit.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a missing or broken embed

The file downloads instead of displaying

That is expected from a File block. Use a document-viewer plugin or a provider-specific embed if an inline preview is required.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Embed block rejects the URL

The service may not be on WordPress core’s supported-provider whitelist. Use the service’s official embed option, a plugin, or a normal link.

An Office preview is blank or reports that the file cannot be reached

Check that the viewer can access the document without a login, that the URL is stable, and that the file is within the selected viewer’s limits. A WordPress page restriction does not solve an external viewer’s access requirement.

The OneDrive workbook does not update

Confirm that the iframe points to the intended workbook and that the latest changes were saved to OneDrive. Recheck the workbook’s sharing and embed settings rather than uploading a second copy to WordPress.

The iframe disappears after saving

Your account or editor may not have permission to retain that HTML. Use a Custom HTML block with an authorized role, or use the provider integration or plugin instead of manually inserting code.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which method should you use?

  • Choose a Media Library file link when downloading the original file is the goal.
  • Choose OneDrive’s iframe when visitors must interact with a live Excel workbook.
  • Choose a document-viewer plugin when a PDF or Office file should be readable inside the page.
  • Choose the generic Embed block only when the content comes from a service WordPress supports.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.