express-csv icon indicating copy to clipboard operation
express-csv copied to clipboard

custom name to csv file?

Open navsaini53 opened this issue 9 years ago • 2 comments

navsaini53 avatar Dec 26 '15 07:12 navsaini53

I'm sure you've probably already figured it out, but before sending the data, set the header and content-type. This is a snippet of how I accomplished it:

res.setHeader('Content-disposition', 'attachment; filename=organization-report.csv'); res.set('Content-Type', 'text/csv');

I hope that helps.

JadisInteractive avatar Nov 15 '16 03:11 JadisInteractive

how about the Unicode character? I stored some Chinese character in DB. When downloading the CSV and open with Excel. All the character will display some unexpected character like "你好呀,我係星展銀行嘅智能小å"

waikchiu5 avatar Jun 20 '17 07:06 waikchiu5