惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
The Cloudflare Blog
博客园 - 聂微东
博客园 - 司徒正美
量子位
博客园 - 三生石上(FineUI控件)
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
A
About on SuperTechFans

Inside Nutrient

A guide to the invisible work behind documents Introducing Nutrient Documents for Salesforce: Native document generation and signing Document AI vs. traditional OCR: Choosing between OCR, AI, and hybrid pipelines PDF SDK compliance and security evaluation checklist for enterprise teams (2026) Invariant Corp replaces paper processes with Nutrient Workflow and scales without limits What is process mapping? A complete guide Nutrient vs. Conga Composer for Salesforce document generation (2026) Document routing: How to automate document distribution The CTO’s AI playbook: Why accountability architecture beats orchestration Compliance workflow automation: Why built-in compliance is table stakes Workflow diagrams: Examples, symbols, and how to build one that actually runs Digital forms: Replace paper forms with automated workflows Approval workflow software: How to automate approvals Why document-centric automation is different The CEO’s AI playbook: Why decision architecture beats model selection Nutrient SDK product updates for Q1 2026 PDF redaction verification: How to prove sensitive data is permanently removed What is a VPAT? The complete guide to accessibility conformance reports What is PDF/UA? The accessible PDF standard explained Salesforce eSignatures: Generate, sign, and track documents in one flow Online document viewer: Options, tradeoffs, and how to embed one Document viewer for web apps: React, Vue, Angular (2026) Best document viewers in 2026: A buyer’s guide How to edit a PDF in Python: Add text, images, and annotations Nutrient advances Workflow platform with agentic AI for enterprise-grade speed and consistency in document-heavy operations How to create a Salesforce quote template from opportunity data The business case for accessibility: Five ways it drives enterprise value Python PDF library comparison (2026): 7 libraries for developers Why your AI agent hallucinates PDF table data PDF.js limitations: When to upgrade to a commercial PDF SDK
How to build an Angular Excel (XLS/XLSX) viewer
Hulya Masharipov · 2023-11-17 · via Inside Nutrient

Table of contents

    In this blog post, you’ll learn how to build an Angular Excel viewer using Nutrient Web SDK. You’ll open and view XLS and XLSX files directly in your web browser using client-side processing (no server required).

    How to build an Angular Excel (XLS/XLSX) viewer

    The image below shows what you’ll be building.

    resulting image

    You can see a demo of this feature in action.

    Opening and rendering Office documents in the browser

    Nutrient Web SDK brings support for Word, Excel, and PowerPoint formats to your application, without you or your users needing any MS Office software, MS Office licenses, or third-party open source software. The technology works by converting an Office document to PDF directly in the browser, and the document is then rendered in our JavaScript viewer.

    Unlocking more capabilities with Office-to-PDF conversion

    ​​By converting an Office document to PDF using client-side JavaScript, you have the option to support a rich array of additional Office document functionality, such as:

    • Text editing — Edit text directly in the displayed Office document.
    • Page manipulation — Organize documents by adding, removing, or rearranging pages.
    • Annotations — Boost collaboration by adding text highlights, comments, or stamps.
    • Adding signatures — Draw, type, or upload a signature directly to an Office document.

    Explore Demo

    Installation

    Add the Nutrient Web SDK dependency to your Angular project:

    yarn add @nutrient-sdk/viewer

    # or

    npm install @nutrient-sdk/viewer

    # or

    pnpm add @nutrient-sdk/viewer

    In your angular.json file, add the SDK assets under the assets array so Angular can serve them correctly:

    "assets": [

    "src/assets",

    {

    "glob": "**/*",

    "input": "./node_modules/@nutrient-sdk/viewer/dist/nutrient-viewer-lib/",

    "output": "./assets/nutrient-viewer-lib/"

    }

    ]

    This ensures the SDK’s required resources are bundled with your app.

    Render an Excel file

    1. Add the Excel (XLS, XLSX) document you want to display to the src/assets directory. You can use our demo document as an example.
    2. Generate a viewer component:

    ng generate component excel-viewer

    1. Replace the contents of src/app/excel-viewer/excel-viewer.component.html with:

    <div class="excel-viewer">

    <div id="nutrient-container" style="width: 100%; height: 100vh"></div>

    </div>

    1. Replace the contents of src/app/excel-viewer/excel-viewer.component.ts with:

    import { Component, OnInit } from "@angular/core";

    import NutrientViewer from "@nutrient-sdk/viewer";

    @Component({

    selector: "excel-viewer",

    templateUrl: "./excel-viewer.component.html",

    styleUrls: ["./excel-viewer.component.css"],

    standalone: true,

    })

    export class ExcelViewerComponent implements OnInit {

    ngOnInit(): void {

    NutrientViewer.load({

    baseUrl: `${location.protocol}//${location.host}/assets/`,

    document: "/assets/chart.xlsx",

    container: "#nutrient-container",

    }).then((instance) => {

    (window as any).instance = instance;

    });

    }

    }

    1. Then, register and render the component in src/app/app.component.ts:

    import { Component } from "@angular/core";

    import { ExcelViewerComponent } from "./excel-viewer/excel-viewer.component";

    @Component({

    selector: "app-root",

    standalone: true,

    imports: [ExcelViewerComponent],

    templateUrl: "./app.component.html",

    styleUrls: ["./app.component.css"],

    })

    export class AppComponent {

    title = "angular-excel-viewer";

    }

    1. Update src/app/app.component.html:

    <excel-viewer></excel-viewer>

    Start the app

    Run the Angular development server:

    yarn start

    # or

    npm start

    # or

    pnpm start

    Visit http://localhost:4200(opens in a new tab) — you’ll see your Excel file rendered in the Nutrient Web SDK viewer.

    A note about fonts

    When you convert an Office document with custom fonts to a PDF, Nutrient Web SDK might not have access to these fonts due to licensing constraints. In this case, Nutrient typically replaces unavailable fonts with their equivalents — like Arial with Noto.

    Adding even more capabilities

    Once you’ve deployed your viewer, you can start customizing it to meet your specific requirements or easily add more capabilities. To help you get started, here are some of our most popular Angular guides:

    Conclusion

    In this blog post, you learned how to build an Excel viewer using Angular with the Nutrient Web SDK. It also discussed the benefits of using Nutrient Web SDK to render Office documents in the browser. If you hit any snags, don’t hesitate to reach out to our Support team for help.

    You can also integrate our Angular Excel viewer using web frameworks like Vue.js and React.js. To see a list of all web frameworks, start your free trial. Or, launch our demo to see our viewer in action.

    Explore related topics

    Try for free Ready to get started?

    Related SDK articles

    Explore more