Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

380
Views
Best way to read an xlsx file in vanilla javascript

So i have a xlsx (Excel File) inside my project and i have a javascript file where i want to only read its values Whats the best way

My project structure is as following:

-src
--js
---js function
-files
--excelFile
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is a pretty good module available on NPM.

In vanilla JS, you can import the module by adding this line to your file:

<script lang="javascript" src="dist/xlsx.full.min.js"></script>

The link above will explain how to use the module to read the file contents, but you probably need to use the Acquiring and Extracting Data section.

There is also a good selection of demos, one of which explains how to read the file in your browser:

// XLSX is a global from the standalone script

(async() => {
  const url = "http://oss.sheetjs.com/test_files/formula_stress_test.xlsx";
  const data = await (await fetch(url)).arrayBuffer();
  /* data is an ArrayBuffer */
  const workbook = XLSX.read(data);

  /* DO SOMETHING WITH workbook HERE */
})();
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!