Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const parse = require('csv-parse')
- const fs = require('fs')
- fs.readFile('./input.csv', (err, data) => {
- if (err) throw err;
- // cell quotes are denoted with "
- parse(data, { quote: '"' }, (err, output) => {
- if (err) {
- throw err
- }
- output.forEach(row => {
- row.forEach(column => {
- process.stdout.write(column + " ")
- })
- });
- })
- });
Add Comment
Please, Sign In to add comment