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
0
votes
1 answer

How do I reuse the result arrays of Papa Parse?

I was reluctant to use Papa Parse, but now I realize how powerful it is. I am using Papa Parse on a local file, but I don't know how to use the results. I want to be able to use the results so I can combine the array with another and then sort…
Dataman
  • 11
  • 9
0
votes
1 answer

Pass event object into template using Meteor

I am building an application for customizing the product grid order of an e-commerce website. Being able to present product order in responsive and flexible ways, would really make it easier for project managers to create a better experience for…
Dylan Nirvana
  • 13
  • 1
  • 7
0
votes
3 answers

Serverside CSV file converting it into an JavaScript array

I'm working on a project where I need to be able to update an HTML table, and I would do it through javascript. I have not yet made an HTML site for this project, for I would try to convert a CSV file to a Java array, which would update the HTML…
The_Mikkel
  • 13
  • 5
0
votes
2 answers

Files don't parse in correct order

I am using PapaParse to parse multiple CSV files. The file selector has them in the order of A B C D E, but they aren't always parsed in that order. I understand that it is because PapaParse will finish up with one file before another, but it is…
user9675088
  • 29
  • 1
  • 5
0
votes
2 answers

Issues with exporting PapaParse function

I am new to JavaScripting and Node and am putting a proof of concept together for my first application. My goal is to: Parse a CSV file (since the data I want is way to small to warrant a database) Load the parsed data into an Array Search the…
Jeremy M
  • 179
  • 2
  • 13
0
votes
1 answer

Including node modules to load local CSV file and run wink-naive-bayes-text-classifier

I just started learning Node.js and can't figure out how to load data from a local CSV file and use wink Naive Bayes Text Classifier to learn the data. I can load the data from local CSV file using this or this example. But the problem is that I do…
user1330974
  • 2,500
  • 5
  • 32
  • 60
0
votes
1 answer

How to do http post with the results/data you get from the complete function in papaparse?

I am basically getting the following error Cannot read property 'post' of undefined My codes are the following: export class AppComponent { constructor(public http: HttpClient, private papa: PapaParseService) {} results:any; …
zhu chen
  • 215
  • 2
  • 11
0
votes
1 answer

Papa parse runs out of order

With PapaParse I'm parsing a csv file which I then add to variable dataShort and dataTotal. I am able to log both dataShort and dataTotal inside of the complete function but not below it. I suppose this happens because the function runs…
0
votes
0 answers

From CSV to JSON with Library PapaParse: 139.420248 =>"139.420.248"?

I'm using PapaParse to convert a CSV file to JSON. Unfortunately PapaParse converts numbers to a wrong format - strings in this case: 139.420248 becomes "139.420.248" Input CSV string: 35.447998,139.419287,2014-02-02 12:18:32 …
user8495738
  • 147
  • 1
  • 3
  • 14
0
votes
0 answers

Unable to parse .csv, .xls, .xlsx file in meteor

I am trying to extract data from .xls, .xlsx But I am getting non-human-readable data in format as shown in image: I have tried as many codes as I can but every code endup at same output. I want data as array of objects for each line in excel.…
Anand Vaidya
  • 609
  • 2
  • 16
  • 41
0
votes
1 answer

papaparse too fast for database angular 5

I'm using papaparse to read the csv file to fetch the records but the issue is that it is too fast for the database. It reads the csv file in an instant but the individual record is still being processed in the database API, so only some records are…
Bilalwcheema
  • 63
  • 2
  • 8
0
votes
1 answer

How to handle an "undefined" error while converting CSV file to JSON using Papa Parse framework?

So, this is my JS code: function main(){ let myJSON = parseCSV(); console.log(myJSON); let myCSV = transformCSV(myJSON); console.log(myCSV); } function parseCSV(){ let parsedJSON; let selectedFile =…
VELFR
  • 407
  • 5
  • 21
0
votes
1 answer

Japanese CSV to JSON parse Error

I want to parse my CSV file into a JSON file. I have parsed it but it's not getting Japanese characters. I am using Papa Parser to parse CSV to JSON. Here is my Code:- Papa.parse("http://localhost:3000/readdata.csv", { download: true, …
Parth Raval
  • 4,097
  • 3
  • 23
  • 36
0
votes
1 answer

Papa parse assign variable on complete

I'm uploading a file using Papa Parse and having trouble assigning the let data variable within complete. The data variable returns undefined. Can someone please explain what I'm doing wrong here? handleCSVInputChange(event) { …
bp123
  • 3,217
  • 8
  • 35
  • 74
0
votes
1 answer

Papaparse looping through rows: unexpected token error

So I'm trying to parse a csv file using papaparse in Meteor, the following is the code: var csv = Assets.getText('test.csv'); Papa.parse(csv, { header:true, complete: function(results) { results.data.forEach(row){ } …
Rew
  • 175
  • 7