nzambello / react-csv-reader

React component that handles csv file input and its parsing
https://nzambello.github.io/react-csv-reader/
MIT License
199 stars 48 forks source link

Problem with parserOptions --> delimiter #8

Closed marcoscarvalho closed 5 years ago

marcoscarvalho commented 6 years ago

Hi,

When I pass something like this below, the delimiter ";" doesn't work.

<CSVReader
      cssClass="react-csv-input"
      label="Select CSV with secret Death Star statistics"
      onFileLoaded={handleForce}
      parserOptions={{
        delimiter: ";" // Delimiter used
      }}
    />

Where I did my test: https://codesandbox.io/s/4rw9qwzzm7

Thanks

nzambello commented 5 years ago

Hi @marcoscarvalho what type of issue are you experiencing? I had no trouble using a .csv file with a content like this:

header0;header1
content0a;content0b
content1a;content1b
content2a;content2b
marcoscarvalho commented 5 years ago

Sorry. I open this issue because my file has ";" in the end of the lines. But I understand now and Thanks.