📜  创建 csv 文件 nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:20.599000             🧑  作者: Mango

代码示例1
const csv = require('csv-parser');
const fs = require('fs');

fs.createReadStream('data.csv')
  .pipe(csv())
  .on('data', (row) => {
    console.log(row);
  })
  .on('end', () => {
    console.log('CSV file successfully processed');
  });