Closed zolfj closed 7 years ago
The first example shows you how https://github.com/zemirco/json2csv#example-1
Thanks for your comments. But when i try to use that fs.writefile and dalling this var fs = require('fs'); in my Angular 2 application, it complains about writeFile. Can you please guide me. I am using this in my angular 2 class.
This module is for node.js only (server side). Maybe try out http://papaparse.com/ with something like https://stackoverflow.com/a/14966131/483616
Hello there,
I am using your library to generate csv for export and my code looks like so, var opts = { data: this.data, fields: fields, quotes: '', hasCSVColumnTitle: false }; json2csv(opts, function (err, csv) { if (err) console.log(err); console.log(csv); });`
How can I expor this to a csv file. Please help!!