Apryse Announces Acquisition of AI-Powered Document Toolkit Provider LEAD Technologies

How to View XLSX in a Vue Web App

By Andrey Safonov | 2022 Jul 27

Sanity Image
Read time

2 min

Looking for a Vue XLSX web app? This blog reveals how you can view Microsoft Office documents in a Vue file viewer using Apryse WebViewer. WebViewer support includes Microsoft Word, Excel, and PowerPoint formats and legacy formats like DOC, XLS, and PPT. 

With a few lines of code, we can show how to view files client-side, with no server dependencies, Microsoft Office licenses or third-party software. Use the Apryse WebViewer to convert `DOCX`, `XLSX`, and `PPTX` files with JavaScript, and then render them for viewing dynamically.

You can also test out office demo for WebViewer and your files. 

For more info, go to the full Vue doc viewer demo on our GitHub page, or visit the documentation for get-started steps and further information on additional functionality. 

Additional Functionality

But WebViewer also supports more than just viewing Office documents. Additional offerings include annotation, mail merge on XLSX templates, text editing, page manipulation, redaction, form filling and creation, and a lot more.

WebViewer also supports formats like PDF, images, videos, and CAD documents. 

How to View XLSX in a React Web App

Copied to clipboard

Step 1 - Get Started

Once the Vue doc viewer example is up and running, pass the URL, blob, file path, or arrayBuffer to `initialDoc` property in WebViewer constructor. 

Code Example for Vue Document Viewer

Copied to clipboard
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' });
  });

Step 2 - Run the App

Now, you can run the app via 'npm start'.

To view the npm React file viewer xlsx app, navigate to http://localhost:3000. If you change any source files, the app automatically reloads.

A Customizable UI

Copied to clipboard

When configuring the UI, use a rich set of APIs included with WebViewer. Read the UI customization guide to see all the possibilities, or create your own UI by referencing our open-source UI code.

Conclusion

Copied to clipboard

You can easily add Office document viewing and collaboration to your native npm React file browser app with Apryse’s WebViewer, a JavaScript-based MS Office SDK. View the source code for this post on our GitHub page.

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.

Sanity Image

Andrey Safonov

Director of Product

LinkedIn link

Share this post

email
linkedIn
twitter