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

206
Vistas
Unable to download excel file from server using javascript

I have created a servlet which displays all the files within a folder (present on server). The filenames displayed are all displayed in the form of links (using a href), so as to facilitate file download.

But when i click on the FileXYZ link, i want to download file, but unable to download. I am using:

function downloadfile(file){
var blob = new Blob(['\ufeff'], {type: 'application/vnd.ms-excel'});
window.navigator.msSaveOrOpenBlob(blob, fileName);
}

<a href="javascript:void(0);" onclick=downloadfile(file);>FileXYZ<a>

I think the 1st parameter ('\ufeff') of Blob object is not correct. What should that be ?

about 4 years ago · Juan Pablo Isaza
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