Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First row of CSV is removed when headers array is provided #252

Closed
dvddpl opened this issue Apr 23, 2019 · 1 comment
Closed

First row of CSV is removed when headers array is provided #252

dvddpl opened this issue Apr 23, 2019 · 1 comment

Comments

@dvddpl
Copy link

dvddpl commented Apr 23, 2019

Docs state:
headers=false: Set to true if you expect the first line of your CSV to contain headers, alternatively you can specify an array of headers to use.
The first row of my CSV does not contain headers therefore i am passing additional array in the headers parameter. At first output looked fine. The saved file contains the headers i wanted.
But then i noticed that the first row ( of valid data! ) of my CSV is beeing removed and replaced by the headers!!
Docs also state:
renameHeaders=false: If you want the first line of the file to be removed and replaced by the one provided in the headers option - Only to be used with headers=[String]
I tried with a CSV file containing headers and i could not see any differences using headers:true or headers:false and when passing headers: [string] the first row is always removed. no matters what renameHeaders is.

doug-martin added a commit that referenced this issue Jul 29, 2019
* [FIXED] First row of CSV is removed when headers array is provided #252
@doug-martin doug-martin mentioned this issue Jul 29, 2019
@doug-martin
Copy link
Contributor

This is fixed in v3.3.0 #269 I updated the formatting docs and published the new package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants