Questions tagged [node-csv-parse]

csv-parse is a parser for Node.js converting CSV text input into arrays or objects. It implements the stream API.

See npm page

73 questions
0
votes
0 answers

Why the line breaks are different of CSV (Macintosh) and CSV parsing with using node module csv-parser?

I'm using node module csv-parser for the streaming csv parsing. It's working fine when uploading a CSV (Comma separated value) but when we upload a CSV (Macintosh) file the problem occurs with line breaks. The CSV that's generated on Windows…
Zeeshan Tariq
  • 604
  • 5
  • 10
0
votes
1 answer

node js Filter CSV Row based on Column Content

I am trying to filter a CSV file on load and have got the following so far: const csv = require('csv-parser'); const fs = require('fs'); fs.createReadStream('Names.csv') .pipe(csv()) .on('data', (row) => { // If Column 2 Is 6 // If…
Techno
  • 11
  • 1
  • 4
0
votes
1 answer

Parse a JSON and Populate into a Table in React JS

I need to parse a CSV File to JSON and Populate it into a Table. I've use PapaParse to parse CSV into a JSON but some of the keys of the JSON have a space in between. I need help in order to do the latter and couldn't figure out what to do. My code…
Catalyst
  • 318
  • 2
  • 10
0
votes
1 answer

How to populate new date column to existing CSV file

I am working with CSV file (~20MB). It has three columns as shown below and the file name presents the start time i.e. timestamp of the first row (in this case file name is 20200325131010000.csv).…
Saurabh Chauhan
  • 3,161
  • 2
  • 19
  • 46
0
votes
1 answer

Publishing more than actual messages in Google Pub/Sub using Node.js and csv-parse

Using Node.js, Google Pub/Sub, csv-parse. Use case - I have a large csv file to process and import in my DB. It has few third party APIs which take 1 second to process each row. So process flow is below - User uploads the file node server upload…
SaharshJ
  • 67
  • 1
  • 11
0
votes
1 answer

Nodejs . Getting [object,Object] when fs.writeFileSync

I am reading a csv file, then writing another in the format I need. console.log shows the data i need but the file I create shows [object, Object] for each line. I am not sure why the console.log shows the correct data but the file does not. I've…
ccdocups
  • 13
  • 3
0
votes
0 answers

Is there a way to specify UTF8 encdoing or add the bom character when transforming one CSV file to another in Javascript?

I'm using the csv module along with csv-parse, stream-transform and csv-stringify modules to read in an excel file and select the columns I need. The CSV file contains special characters in Portuguese that cannot be encoded properly because I ignore…
user8565662
  • 127
  • 1
  • 1
  • 6
0
votes
1 answer

How to use .subscribe() in node-csvtojson library

I am trying to use the csv to csv line function in node-csvtojson (documentation here) csv({output:"line}) .fromString(my_csv_string) .subscribe(csvLine => { console.log(csvLine) }) But I can't quite understand how I'm supposed…
Chapo
  • 2,563
  • 3
  • 30
  • 60
0
votes
2 answers

How to obtain the output after parsing the csv using csv-parser?

I am parsing a huge csv (1.2GB) using csvparser and trying to obtain certain column data from the parsed csv. I am trying to push the data to the array after processing, but only getting empty array as output. How can I fix this code? var parse =…
csvb
  • 365
  • 2
  • 6
  • 14
0
votes
1 answer

How can I parse data from a csv file uploaded by a user in node/express?

I have a front end react app and a backend node/express app. I want to allow a user to upload a csv file, then parse the file and instantiate a model for each row. However, I am somewhat confused about how to do this, since I am used to simply…
adam tropp
  • 674
  • 7
  • 22
-1
votes
1 answer

Does csv-parse allow you to read from file?

I'm learning how to use the csv-parse module for nodejs. I wrote this code and it works perfectly: var fs = require('fs'); const fileName = './spreadsheet.csv'; const assert = require('assert'); const { parse } = require('csv-parse'); const…
John
  • 32,403
  • 80
  • 251
  • 422
-1
votes
1 answer

How to insert new column into CSV in nodejs

I have to add a new cell in each row. let's say I have a list of products CSV and I am fetching the image URL for each product it using some functionality and I need to update the URL corresponding to each product. const writestream =…
m9m9m
  • 1,655
  • 3
  • 21
  • 41
-2
votes
1 answer

How to read and parse a CSV file from an Axios GET request in Node/Express?

I'm creating a Node/Express backend that uses axios to make a GET request to this URL:…
1 2 3 4
5