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 Build a Flutter PDF Viewer

This guide shows you your options to build a Flutter PDF viewer and your potential best path forward towards a professional solution.


How to Embed PDF Files or a PDF Viewer in an HTML Website

This blog discusses the three options for embedding PDF files or a PDF viewer in a website that are available to you, starting with the simplest and ending with the PDF viewing bells and whistles.


How to Extract Text from PDFs Using Python

A tutorial on how to extract text from a PDF using Python and the PDFTron SDK for machine learning.


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: PDFTron SDK Tech Review | Nov 29, 2022 at 2 pm ET


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use