Write to a CSV in Node.js

前端 未结 6 1147
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 14:47

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.

6条回答
  •  半阙折子戏
    2020-12-09 14:57

    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.

提交回复
热议问题