Bunlong / react-papaparse

react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
https://react-papaparse.js.org
MIT License
363 stars 60 forks source link

Error in One-Column-File #165

Open hackmars-pro opened 6 months ago

hackmars-pro commented 6 months ago

Thank you for good and simple library.

When parsing valid CSV files with only one column, an error is generated. Although the generation is understandable, as no separators are used and can therefore be determined, but it affects the error handling. It would be desirable not to generate them, or to optionally deactivate them.

const csvData = readString(str, {header: true, skipEmptyLines: 'greedy'})
console.log('csvData', csvData)
return csvData

grafik

example.csv