Blog
Wild & Free Tools

How to Embed an Excel Viewer in a Website — 3 Free Methods

Last updated: March 4, 2026 6 min read

Table of Contents

  1. Method 1: Google Sheets Embed (Easiest)
  2. Method 2: OneDrive/Office 365 Embed
  3. Method 3: SheetJS (Full Control, No External Service)
  4. Comparison: Which Method to Use
  5. When a Viewer Link Works Better Than an Embed
  6. Frequently Asked Questions

If you want to display a spreadsheet on a webpage so visitors can view the data without downloading a file, you have three main free options: Google Sheets embed, OneDrive embed, and the SheetJS JavaScript library. Each has different trade-offs around privacy, control, and setup complexity.

Method 1: Google Sheets Embed — Easiest Option

If your data can live in a Google Sheet, this is the simplest way to embed a spreadsheet viewer on any webpage:

Steps:

  1. Upload your Excel file to Google Drive and open it in Google Sheets
  2. Click File > Share > Publish to web
  3. Select "Embed," choose the sheet and range, and click "Publish"
  4. Copy the generated <iframe> code and paste it into your webpage HTML

Sample embed code:

<iframe
  src="https://docs.google.com/spreadsheets/d/SHEET_ID/pubhtml"
  width="100%" height="400"
  frameborder="0">
</iframe>

Pros: Zero hosting cost, no code required, updates automatically when you edit the Sheet.

Cons: Requires a Google account. Data is publicly accessible (anyone with the link can view it). Google branding appears in the embedded view.

Method 2: OneDrive Excel Embed (Microsoft)

Microsoft OneDrive and SharePoint Online support embedding Excel files in webpages via an iframe. This keeps your data in the Microsoft ecosystem.

Steps:

  1. Upload your Excel file to OneDrive
  2. Open the file in Excel Online (browser version)
  3. Click File > Share > Embed
  4. Configure the embed options (which cells to show, interaction level) and copy the iframe code

Pros: Excel-accurate rendering, supports charts and pivot tables in the embed view, integrates with Microsoft 365.

Cons: Requires a Microsoft account (personal or business). The embedded file must be publicly shared or the viewer must be signed in. OneDrive personal storage limits apply.

Sell Custom Apparel — We Handle Printing & Free Shipping

Method 3: SheetJS — Full Control, No External Dependency

SheetJS is an open-source JavaScript library that reads .xlsx, .xls, .csv, and other formats directly in the browser. If you want to host your own spreadsheet viewer with no reliance on Google or Microsoft, SheetJS is the path.

Basic embed example:

<script src="https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js"></script>
<div id="grid"></div>
<script>
  fetch("data.xlsx")
    .then(r => r.arrayBuffer())
    .then(buf => {
      const wb = XLSX.read(buf);
      const html = XLSX.utils.sheet_to_html(wb.Sheets[wb.SheetNames[0]]);
      document.getElementById("grid").innerHTML = html;
    });
</script>

Pros: No external service dependency, full control over styling, data can stay on your own server, no Google or Microsoft account required.

Cons: Requires developer skills. You handle styling, accessibility, and updates yourself. CDN version ties you to SheetJS versioning.

Choosing the Right Excel Embed Method

MethodSetup DifficultyExternal AccountHosting CostStyling Control
Google Sheets embedEasy (5 min)GoogleFreeMinimal
OneDrive embedEasy (5 min)MicrosoftFreeMinimal
SheetJSDeveloper (1-2 hrs)NoneYour serverFull

For most use cases, Google Sheets embed takes 5 minutes and works well. If you need Microsoft-accurate rendering, use OneDrive. For full control with no external dependency, SheetJS is the right choice but requires development time.

When to Link to a Viewer Instead of Embedding

Embedding a spreadsheet makes sense when your data is a core part of the page — reference tables, price lists, datasets users need to browse.

For cases where viewers just need to open a file you have provided for download, consider linking to a browser-based viewer instead:

This approach requires no embed setup and the viewer handles all the rendering complexity.

Try It Free — No Signup Required

Runs 100% in your browser. No data is collected, stored, or sent anywhere.

Open Free Excel Viewer

Frequently Asked Questions

How do I embed an Excel file viewer in a website for free?

Three free methods: Google Sheets embed (upload to Sheets, use File > Share > Embed), OneDrive embed (upload to OneDrive, use Excel Online share > Embed), or SheetJS (open-source JavaScript library for custom builds). Google Sheets is the easiest for non-developers.

Can I embed an Excel viewer without Google or Microsoft accounts?

Yes, using SheetJS — an open-source JavaScript library that renders spreadsheets in the browser without any external service. It requires developer skills to implement but has no account dependency.

Does embedding a Google Sheets spreadsheet make the data public?

When you publish a Google Sheet to the web for embedding, the data becomes publicly viewable by anyone with the embed URL. Only share data publicly that is appropriate for public access.

Is there a simpler alternative to embedding for sharing Excel files?

Yes. Host the Excel file as a download and link to a browser-based viewer tool. Users open the viewer in their browser and load the file themselves — no embed setup required on your end.

Amanda Brooks
Amanda Brooks Data & Spreadsheet Writer

Amanda spent seven years as a financial analyst before discovering free browser-based data tools. She writes about spreadsheet tools, CSV converters, and data visualization for non-engineers.

More articles by Amanda →
Launch Your Own Clothing Brand — No Inventory, No Risk