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

189
Views
Express CSV download link in email triggers download on mac but not windows

I'm using Express and ExcelJs to create a CSV that users can download. I'm sending the users an email using Sendgrid and putting the params in a link in the email that dynamically generates the CSV. Everything works locally, and on macs. But on my windows computer, what happens is when I click the link, a new tab temporarily opens, then closes. Here is the ExcelJs code that being returned from the script that actually creates the CSV (with all the CSV logic excluded):

return await workbook.xlsx.writeBuffer()

then this is the Express code that sends the CSV to the user in the response:

const buffer = await generateWorkbook(csvData, styleInfo)

res.status(200)
  .set("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
  .attachment("csv.xlsx")
  .send(buffer)

Any thoughts why this doesn't work across all platforms? Follow up question, if it isn't possible for this approach to work across all platforms, would a more consistent approach be to create a new tab, send the user to a page in our domain, then initiate the download from there and close the new tab?

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!