Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

385
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda