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

107
Vistas
XLSX save file instead of downloading on frontend

I am a little new to javascript. I have got one javascript function which is generating xlsx file from HTML table. It's working fine but as soon as the file gets generated, it's downloading the file instead I am looking to save it on my server. The function is like below

function ExportToExcel(type, fn, dl) {
       var elt = document.getElementById('tour');
       var wb = XLSX.utils.table_to_book(elt, { sheet: "sheet1" });
       return dl ?
         XLSX.write(wb, { bookType: type, bookSST: true, type: 'base64' }):
         XLSX.writeFile(wb, fn || ('MySheetName.' + (type || 'xlsx')));
}

and I am calling it like below:

onclick="ExportToExcel('xlsx')"

How to store the file instead of downloading it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Not understanding why you want to generate XLSX on the Client and save it to the server later on. I suggest you generate it on the server itself.

Take a look at answers to this question if you want to save/generate an XLSX file in Node.JS.

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