Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  30] [ 5]  / answers: 1 / hits: 141324  / 12 Years ago, thu, april 19, 2012, 12:00:00

I am struggling to find a way to write data to a CSV in Node.js.



There are several CSV plugins available however they only 'write' to stdout.



Ideally I want to write on a row-by-row basis using a loop.


More From » node.js

 Answers
46

The docs for node-csv-parser (npm install csv) specifically state that it can be used with streams (see fromStream, toStream). So it's not hard-coded to use stdout.



Several other CSV parsers also come up when you npm search csv -- you might want to look at them too.


[#86136] Wednesday, April 18, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
simone

Total Points: 558
Total Questions: 96
Total Answers: 99

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
;