Parsing a CSV file using NodeJS

后端 未结 16 2364
执笔经年
执笔经年 2020-11-27 12:15

With nodejs I want to parse a .csv file of 10000 records and do some operation on each row. I tried using http://www.adaltas.com/projects/node-csv. I couldnt get this to pau

16条回答
  •  我在风中等你
    2020-11-27 12:31

    fs = require('fs');
    fs.readFile('FILENAME WITH PATH','utf8', function(err,content){
    if(err){
        console.log('error occured ' +JSON.stringify(err));
     }
     console.log('Fileconetent are ' + JSON.stringify(content));
    })
    

提交回复
热议问题