Questions tagged [papaparse]

Papa Parse is a fast and powerful CSV parser for JavaScript.

Papa Parse (formerly the jQuery Parse Plugin) is a robust and powerful CSV (character-separated values) parser with these features:

  • Easy to use
  • Parse CSV files directly (local or over the network)
  • Stream large files (even via HTTP)
  • Reverse parsing (converts JSON to CSV)
  • Auto-detect the delimiter
  • Worker threads to keep your web page reactive
  • Header row support
  • Pause, resume, abort
  • Can convert numbers and booleans to their types
  • Graceful and robust error handling
  • Minor jQuery integration to get files from <input type="file"> elements
  • Papa Parse has no dependencies - not even jQuery.

Visit the Papa Parse project page on GitHub.

Homepage & Demo

To learn how to use Papa Parse: see Documentation.

papaparse.min.js can be linked or downloaded to your project source.

418 questions
1
vote
1 answer

If value exists in CSV Papa Parse and jQuery

I am trying to search all fields in a CSV file and IF the value exists do one thing and IF NOT do another. I have Papa Parse reading the CSV file and logging to console the values on submit but for the life of me can not figure out the input value…
Aaron
  • 525
  • 2
  • 9
  • 22
1
vote
0 answers

unexpected end of while when zlib.gunzipping very large file from s3 bucket

I'm loading a very large file from an AWS s3 bucket, creating a readStream out of it, gunzipping it, and then passing it through Papa.parse. When I say "very large file", I mean it's 245 MB gzipped, and 1.1 GB unzipped. Doing this with smaller files…
mcv
  • 4,217
  • 6
  • 34
  • 40
1
vote
1 answer

Using php “fputcsv” to save an array (that includes cells with special charcters) created by papa.unparse, as a csv

Although there are various php/csv answers on stackOverflow, I cannot see an answer to my exact problem. I have the following php script, which is called from javascript – via AJAX XMLHttpRequest() to save an array as a csv file. I use javascript…
IanR
  • 31
  • 1
  • 5
1
vote
1 answer

how to import papaparse in javascript?

I installed papaparse using npm install papaparse in my createa folder. However, when I try to do import { Papa } from 'papaparse'; in index.js I get this error: (node:6680) Warning: To load an ES module, set "type": "module" in the package.json or…
j. doe
  • 23
  • 2
  • 5
1
vote
0 answers

"Uncaught SyntaxError: Cannot use import statement outside a module" Trying to import library into a JavaScript file

I am building a chrome browser extension, and I am trying to use the library PapaParse to parse through a csv file. I am working with a local copy of the library, which I downloaded from their website. I am trying to import the library into a…
1
vote
2 answers

Replacing empty Strings with custom text (PapaParse)

Is there a way PapaParse can replace empty Strings to a custom text? I want to export JSON to CSV but when there is a field with no data in it I want to export something like "MISSING DATA" automatically without going trough my array with a loop…
Scoopex
  • 463
  • 3
  • 11
1
vote
1 answer

Axios post Large File

I am trying to Post a large JSON into my Database, the JSON has at least 400.000 Objects. If I cut the file, and try to Post 20.000 Objects everything works just fine, so the problem should be JSON's size. I've split the JSON into 20 chunks, and my…
Retalhante
  • 11
  • 1
  • 4
1
vote
1 answer

Iterating over results of papa.parse object

I believe this may be an issue with async or promises, however, this concept has been a struggle for me to grasp. I have spent much time researching questions relating to papaparse and promises, but believe I am still not grasping some simple…
jclark754
  • 914
  • 2
  • 12
  • 30
1
vote
0 answers

How can i read the content of a csv file with papaparse ? using react native

I tried papaparse in order to convert a csv file to json , my problem is that he didn't get the content of the file , it return the uri of file as a string .. Here is my code const chooseFile = async() => { try { const`enter code…
1
vote
1 answer

set csv encoding when downloading a file

I am using react, Paparse and encoding-japanese With Paparse I can upload a CSV and decode it from Shift-JS. but the opposite operation is not supported by the library. I added the encoding-japanese, in order to convert a string to SHIFT-js and…
Bobby
  • 4,372
  • 8
  • 47
  • 103
1
vote
1 answer

Import specific column from CSV Data using Papa Parse with Ionic 4

I have code that is pulling in CSV data into my Ionic 4 app using Papa Parse plugin, but I want to pull in specific fields of data - not really sure how to pull it off. For example, what if I wanted to display only "First Name" and "Last Name"…
pjleinen
  • 69
  • 1
  • 5
1
vote
1 answer

Web Workers, Jasmine and Papa Parse

I'm using PapaParse to parse a CSV file passed by the user. Here is my code: this.fileToUpload = files.item(0); this.status = Status.Loading; let batch = []; this.papa.parse(this.fileToUpload, { worker: true, step: (row) => { if…
Mark Barrett
  • 366
  • 2
  • 16
1
vote
1 answer

Store very large JSON Object in memory while parsing uploaded CSV file (approx. 8GB) on the UI

I have a functionality where the user can browse CSV file approx. size 8GB on the UI. Once the UI has the File object I used Papa Parse to parse the CSV file, which works like a charm. While parsing I am constructing an object from each CSV record…
Saurabh Verma
  • 35
  • 1
  • 6
1
vote
0 answers

add multiple csv files to the graph with papaparse

So, I've tried parsing my csv file which I've got from an input like this: const jsonData = Papa.parse(documentvalue); this.data1 = this.prepareData(jsonData.data); And in my function, i try then to update my graph: setTimeout(() => { …
J.Doe
  • 586
  • 2
  • 8
  • 30
1
vote
1 answer

Google Cloud Function not recognizing Papaparse 5.0 Dependency

I am building a Node.js Google Cloud function, and it is not recognizing the dependency "papaparse": in package.json "dependencies": { "papaparse": "^5.0.0", "twilio": "^3.33.2" } Error code I am getting: Function failed on loading…
smity
  • 58
  • 1
  • 6