Spreadsheet Editor is part of the Apryse Web SDK’s Office editing suite, offering client-side access and viewing of XLSX files with a familiar, Excel-like interface. Used alongside the DOCX Editor and WebViewer’s PDF editing tools, it completes a full set of in-app document editing capabilities for developers. Spreadsheet Editor integrates easily into any JavaScript framework like React, Angular, Vue, Nuxt.js, or Next.js using a simple DOM element to host the component. It preserves the structure and integrity of template-based, compliance-intensive, and formula-driven content.
Currently, Spreadsheet Editor supports only viewing mode, allowing users to open and navigate spreadsheets. Editing mode and mobile support is not yet available but will be introduced in a future release.
To enable Spreadsheet Editor, you can pass the initialMode
parameter in WebViewer’s constructor options. The following will load a new empty spreadsheet:
To load a existing document initially, you can pass the initialDoc
:
Spreadsheet Editor is currently supported in the Iframe version of the Web SDK Modular UI. For more details on initializing in Iframe mode, refer to this guide.
To load a spreadsheet programatically when already in Spreadsheet Editor, you can use UI.loadDocument
:
If you are switching to Spreadsheet Editor from PDF Editor, the initialMode
parameter is needed in the options when calling UI.loadDocument
:
Another option is to use Core.documentViewer.loadDocument
. Make sure to pass enableOfficeEditing: true
as the parameter in the options.The file URI requires the correct file extension .xlsx
.
If you are passing in a blob, make sure to pass the extension
option as xlsx
:
If you started the viewer in Spreadsheet Editor mode, and load a file an XLSX file using the UI's file picker, it will always load it in Spreadsheet Editor mode.
By default, Spreadsheet Editor will be enabled in view mode, which allows user to navigate spreadsheets using a familiar grid interface, view calculated cells and formulas, and change workbook sheets without making unexpected changes
You can check the Spreadsheet Editor mode with:
When in view mode, you can use the following two events to access the information needed:
(1) SelectionChangedEvent: Triggered when selecting cells in a sheet
(2) ActiveSheetChangedEvent: Triggered when switching to another sheet
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales