SDK Integration Guide
The Apryse Spreadsheet Editor SDK embeds a full spreadsheet editing experience and data grid interface in Angular applications. It loads XLSX, XLS, and CSV files client-side using WebAssembly, with no server round-trip and no SaaS seats. Apryse provides view mode for read-only spreadsheet navigation and edit mode for cell editing, common formulas, and charts.
What Is the Difference Between an Angular Data Grid and a Spreadsheet Editor?
In short, a data grid is a library that allows developers to display data sets in a tabular format in a web app. The data is typically supplied as arrays or objects, adn users can sort, filter, resize, or configure columns.
A Spreadsheet Editor opens and edits an actual spreadsheet file. Unlike a simple data set, a spreadsheet itself is self-contained and can include formulas, cell formatting, charts, tables, and other features that remain intact when the file is saved.
Apryse's Spreadsheet Editor add-on combines elements of both: it displays data in a grid-like interface and loads real XLSX, XLS, and CSV files for editing.
Comparison: Data Grid vs. Spreadsheet Editor
Setting Up and Using the Apryse Spreadsheet Editor in Angular
The Spreadsheet Editor is an add-on to Apryse's document viewer SDK. Install the WebViewer package and mount it to a DOM element inside an Angular component.
WebViewer requires copying static assets from node_modules/@pdftron/webviewer/public, the core, ui, and (in some setups) webviewer.min.js files, into a publicly served directory, typically via the assets array in angular.json, before the SDK initializes.
In Visual Studio Code, add this code to the webviewer.ts file and save:
Now that you have WebViewer, to enable the Spreadsheet Editor, set the initialMode parameter in the WebViewer constructor. Supported values are defined in the Modes enum.
Find more detailed instructions in the documentation.
Loading and Displaying Spreadsheet Files
Spreadsheet Editor activates automatically when an XLSX, XLS, or CSV file loads with the add-on license active, no separate constructor option is needed. XLS and CSV files convert to XLSX in the browser on load; the source file in storage is not modified.
View mode is the default state. It provides:
- Read-only navigation of the spreadsheet
- Viewing calculated cell values and underlying formulas
- Switching between workbook sheets
Sheets can also be created, removed, or switched programmatically through the same manager object used for edit mode.
Enabling Edit Mode for Cell Editing and Formulas
Edit mode is activated with:
Once active, it supports:
- Cell formatting: text size, color, fonts, border styles, cell colors, bold, italic, underline, strikethrough
- Formulas: standard mathematical, statistical, date/time, and common functions
- Data manipulation: adding, editing, and deleting rows and columns; cut, copy, paste
- Cell adjustments: merging cells, with formatting preserved
- Workbook operations: getting, creating, removing, or switching sheets, programmatically or via the UI
As of this writing, sorting, filtering, pivot tables, and conditional formatting are not currently supported, but Apryse continues to add new Spreadsheet features in our regular quarterly releases.
Chart Rendering and Data Visualization
Spreadsheet Editor currently renders a wide range of charts. Users can select, move, and resize charts directly in the browser, and the same interactions are exposed through the API for building custom chart controls into an application.
Exporting and Saving Spreadsheets
Users can save and download spreadsheets as XLSX or PDF. Saving or exporting back to XLS or CSV is not currently supported, regardless of the file's original format on input. See the Spreadsheet Editor documentation for the full save and export workflow.
Client-Side Architecture and Data Residency
Spreadsheet Editor runs entirely in the browser through a WebAssembly module compiled from Apryse's C++ core. No document content is transmitted to Apryse infrastructure. For teams evaluating client-side spreadsheet editing for data residency reasons, this means spreadsheet files are opened, edited, and exported without a document ever leaving the user's browser session.