Search
 
SCRIPT & CODE EXAMPLE
 

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');
  });
Comment

how to read a csv file in nodejs

$ npm i -s csv-parser
Comment

how to read a csv file in nodejs

$ npm i -s csv-parse
Comment

PREVIOUS NEXT
Code Example
Javascript :: math random 0 to 100 
Javascript :: node cron every second 
Javascript :: javascript get date without time 
Javascript :: change placeholder text jquery 
Javascript :: jquery serialize form data and submit 
Javascript :: uniqid js 
Javascript :: react native spinner 
Javascript :: nuxt 18 mountend route push 
Javascript :: jquery scroll left animation 
Javascript :: js rounding 
Javascript :: js console.log color reset 
Javascript :: javascript array to comma separated string 
Javascript :: convert binary to decimal javascript 
Javascript :: javascript hasownproperty 
Javascript :: javascript loop through string 
Javascript :: wait for the dom to load javascript 
Javascript :: regex cpf javascript 
Javascript :: missing from-clause entry for table sequelize limit 
Javascript :: alpinejs cdn 
Javascript :: jest expect href 
Javascript :: angularjs cdn 
Javascript :: return a boolean if a number is divisible by 10 javascript 
Javascript :: foreach selector in jquery 
Javascript :: jquery create div element 
Javascript :: how to call a function with a button in javascript 
Javascript :: jest assert if empty array 
Javascript :: Create slug from string in Javascript 
Javascript :: waypoint cdn 
Javascript :: file input disable open file picker javascript 
Javascript :: javascript eliminar items repetidos 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =