Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node read csv

npm i -s csv-parser
...
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');
  });
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #node #read #csv
ADD COMMENT
Topic
Name
7+5 =