COMING SOON: Fall 2024 Release
By Andrey Safonov | 2022 Jul 11
2 min
Tags
view
xlsx
react
Looking for a React XLSX viewer? This blog reveals how to view Microsoft Office documents in a React file viewer using Apryse’s WebViewer. This includes Microsoft Word, Excel, and PowerPoint formats and legacy formats like DOC, XLS, and PPT.
In a few lines of code, we'll show how you can view files client-side, with no server dependencies and without Microsoft Office licenses or third-party software. Apryse’s WebViewer directly converts DOCX, XLSX, and PPTX files using JavaScript and renders them for viewing dynamically.
Try our Office demo with WebViewer showcase to test with your own files now.
Check out the full React doc viewer demo on our GitHub page. And visit the documentation for the get-started steps and information on additional functionality.
WebViewer supports more than simply viewing Office documents, offering annotation, mail merge on XLSX templates, text editing, page manipulation, redaction, form filling and creation, and much more.
Once the React doc viewer example is up and running, pass the URL, blob, file path, or arrayBuffer to initialDoc
property in WebViewer constructor.
WebViewer({
...,
initialDoc: 'https://myserver.com/myfile.xlsx',
}, document.getElementById('viewer'));
You can also call loadDocument
with the same parameters.
WebViewer(...)
.then(instance => {
instance.UI.loadDocument('https://myserver.com/myfile.xlsx', { filename: 'myfile.xlsx' });
});
You can now run the app via 'npm start'.
To view the npm React file viewer xlsx app, navigate to http://localhost:3000/
. The app automatically reloads if you change any of the source files.
If you want to configure the UI, WebViewer comes with a rich set of APIs. To get an idea of the vast array of possibilities, check out the UI customization guide. You can also create your own UI by referencing our open-source UI code.
Adding Office document viewing and collaboration to your native npm React file browser app is straightforward with Apryse’s WebViewer, a JavaScript-based MS Office SDK. Find the source code for this blog post on our GitHub.
See for yourself. Try out Apryse features using your own documents with the interactive demo at Apryse showcase.
Have any questions about Apryse’s SDK or WebViewer? Start a chat on Discord with our solutions engineers or reach out to our sales team for a personalized demo.
Tags
view
xlsx
react
Related Products
Share this post
PRODUCTS
Enterprise
Small Business
Popular Content