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

245
Views
descargue y guarde el archivo de Excel por http en el nodo js

Tengo debajo del código del nodo js para descargar un archivo de otro servidor, pero después de la descarga, cuando quiero abrir el archivo, aparece un error y el mensaje de error es "El formato o la extensión del archivo no es válido..."

 http.get('http://members.tsetmc.com/tsev2/excel/MarketWatchPlus.aspx?d=0', (response) => { var dataChunk = '' var path='data.xlsx' response.on('data', (chunk) => { dataChunk += chunk; }); response.on('end', () => { fs.writeFile(path, dataChunk, undefined, function (err) { if (err) { console.log(err); res.status(500).send(err); return } console.log("The file was saved!"); res.status(200).send(dataChunk); }) }); }).on("error", (error) => { console.log("Error: " + error.message); });
about 4 years ago · Juan Pablo Isaza
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!