Some test text!

Jul 27 2022

How to View XLSX in a Vue Web App

by Andrey Safonov

Looking for a Vue XLSX web app? This blog reveals how you can view Microsoft Office documents in a Vue file viewer using

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 PDFTron WebViewer to convert `DOCX`, `XLSX`, and `PPTX` files with JavaScript, and then render them for viewing dynamically. 

You can also test out

for WebViewer and your files. 

For more info, go to the full Vue doc viewer demo on our

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

mail merge
on XLSX templates,
text editing
page manipulation
form filling and creation
, and a lot more. 

WebViewer also supports formats like PDF, images,

, and

How to View XLSX in a React Web App 

Step 1 - Get Started 

Once the Vue doc viewer example is up and running,

the URL, blob, file path, or arrayBuffer to `initialDoc` property in WebViewer constructor. 

Code Example for Vue Document Viewer 

  initialDoc: '',
}, document.getElementById('viewer'));

You can also call `loadDocument` with the same parameters.

  .then(instance => {
    instance.UI.loadDocument('', { 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

. If you change any source files, the app automatically reloads. 

 A Customizable UI 

When configuring the UI, use a rich set of APIs included with WebViewer. Read the

to see all the possibilities, or
create your own UI
by referencing our open-source
UI code


You can easily add Office document viewing and collaboration to your native npm React file browser app with PDFTron’s WebViewer, a

. View the source code for this post on our

You can also see other capabilities on our

If you have any questions about PDFTron’s SDK or WebViewer, please

Related articles


How to View XLSX in a Vue Web App

This blog post describes how to open XLSX documents in a Vue web app and much more with PDFTron WebViewer.


How to View XLSX in an Angular Web App

This article describes how to open XLSX documents in an Angular web app and so much more with PDFTron WebViewer.


How to View PPTX Documents in a Vue Web App

A description of how to open PPTX documents in a Vue web app and so much more with PDFTron WebViewer.


Head of Product

First a developer then a solution engineer. Now a product team leader and dev experience advocate.

Related Products

Share this post

Upcoming Webinar: Customer Experience and Retaining Control: Boosting Document Automation and Efficiency in Financial Services | Sept 15, 2022 at 11 am PT


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use