2 min
Tags
react
office
view
Looking for a React DOCX viewer? This blog will reveal how to view Microsoft Office documents in a React file viewer app using Apryse’s WebViewer. This includes file like 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 to test WebViewer with your files. Check out the full React doc viewer demo on our GitHub. 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 DOCX templates, text editing, page manipulation, redaction, form filling and creation, and much more. WebViewer also supports formats like PDF, images, videos, and CAD documents. Learn more about PDF editing and manipulation using React. Copied to clipboard Once the React doc viewer example is up and running, pass the URL, blob, file path, or arrayBuffer to You can also call You can now run the app via 'npm start'. To view the npm React file viewer docx app, navigate to Additional Functionality
Step 1 - Get Started
initialDoc
property in WebViewer constructorCode Example for React Document Viewer
WebViewer({ ..., initialDoc: 'https://myserver.com/myfile.docx',}, document.getElementById('viewer'));
loadDocument
with the same parameters.WebViewer(...) .then(instance => { instance.UI.loadDocument('https://myserver.com/myfile.docx', { filename: 'myfile.docx' }); });
Step 2 - Run the App
http://localhost:3000/
. The app automatically reloads if you change any of the source files.A Customizable UI
Copied to clipboard
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.
Explore even more functionality. Learn about PDF layers in WebViewer.
Copied to clipboard
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.
To demo WebViewer capabilities right now, please visit the showcase.
If you have any questions about Apryse’s SDK or WebViewer, please get in touch.
Tags
react
office
view
Share this post