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

How to use local file with PapaParse while using Promises

I'm trying to parse a local file with PapaParse but the console returns undefined. Also, if I comment out the download:true the console returns an empty array. Is there something wrong with the way I'm passing the local file as an argument because…
Kartik Tyagi
  • 25
  • 1
  • 5
1
vote
1 answer

failed to load csv file using csv-loader

I am learning webpack-loader, and using csv-loader to load a csv file. I have already install the csv-loader and add the rule. However, webpack log an error: Cannot find module 'papaparse'. How do this error happened?
Loris Lo
  • 11
  • 2
1
vote
1 answer

transform is not being called when parsing a file

I am using papaparse and I would like to transform my values as they are being parsed. I have added a transform function but it never gets called. What am I doing wrong? Papa.parse(file, { complete: ({data, errors, meta}) => { alert('I…
Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
1
vote
2 answers

Storing in Global Variables

I'm using Papa Parse to parse a local CSV file. When I print my updated objects to the console, I get the object to return with the changed values I have applied based on certain conditions. My problem is getting the image dimensions: Width and…
Ish Sah.
  • 43
  • 3
1
vote
0 answers

How to using post method to download csv file using Papaparse?

I want to request the file using “POST” Method? Any suggestion? url = "https://www.xxxx.com/data.csv"; Papa.parse(url, { download: true, complete: function() { // executed after all files are complete } });
Grant.Zuo
  • 11
  • 1
1
vote
1 answer

Error: Synchronous http requests are not supported

I'm getting Error: Synchronous http requests are not supported However I am not doing any http requests. All I am doing is trying to parse a local csv file. Here is my script: import RNFS from 'react-native-fs'; import Papa from…
Hosam Abdelnaser
  • 127
  • 2
  • 11
1
vote
1 answer

Getting undefined when passing the data(Typescript - protractor)

I am getting undefined value when calling enterUsingCSV() directly. The function works correctly when called inside GetDataExcel(). Can anyone explain what is happening? //// GetDataExcel(col: number) { this.papa.parse(this.file, { …
1
vote
2 answers

Move results of papaparse into array

I'm using papaparse to parse a local csv file using the following: var display_links = []; Papa.parse(file_links, { header: true, download: true, dynamicTyping: true, complete: function (results) { …
stephen.webb
  • 175
  • 2
  • 13
1
vote
2 answers

Can't trigger setState with react on subsequent data fetch w/ papa parse to pass new props to rerender child component?

I've read many posts but this is my first question! Let me first thank everyone for their support, and offer a description of the problem before a lengthy block of code! Any help is appreciated...I think I'm close! QUESTION/PROBLEM: my setState…
Union In Design
  • 141
  • 1
  • 6
1
vote
0 answers

Understanding Papaparse

I am trying to understand Papaparse. I see a lot of examples do something like this var file = evt.target.files[0]; Papa.parse(file, { header: true, dynamicTyping: true, complete: function(results) { data = results; } }); This…
katie hudson
  • 2,765
  • 13
  • 50
  • 93
1
vote
2 answers

PapaParseService' is not exported by node_modules/ngx-papaparse/dist/index.js

I'm using Angular 4 and want to use ngx-papaparse to parse some csv I ran yarn add -D ngx-papaparse@1.2.5 imported it in my app.module import { PapaParseModule } from "ngx-papaparse"; imports: [ BrowserModule, BrowserAnimationsModule, …
Ben
  • 81
  • 1
  • 10
1
vote
1 answer

PapaParse Script Path is Undefined

I've been looking all over for a solution to this and I can't figure it out for the life of me... The sitch: I have a lazy loaded React component which is supposed to parse a CSV file (with PapaParse) which is all built within the create-react-app…
ainsley26
  • 13
  • 3
1
vote
0 answers

Javascript create string with new lines from csv file

Im trying to load csv file in React and then format it to be saved as a string with line breaks. The problem is this: After this code block: makeArrayString() { let array = this.state.tempData; let finalArray = []; …
afalak
  • 481
  • 5
  • 9
1
vote
2 answers

How do I correctly add PapaParse to my Electron project?

I have installed it in my project folder with: npm install papaparse --save and included in my main.js file: const Papa = require('papaparse') My package.json shows papaparse as a dependancy. However I get the following error: index.html:77…
WarmCat
  • 11
  • 3
1
vote
0 answers

Papa Parse - Populate table with JSON after parse CSV file

I'm adding a new functionality to my web application, so the user can upload a .csv file and send it to the database. At the time of the upload, I want to read the data as JSON and display it in a table, so the user can check if everything is as it…
LuisMorais
  • 162
  • 4
  • 16