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

Column headers row are removed blank spaces also on the first row of csv #101

Closed
makiBaraba opened this issue Apr 22, 2024 · 5 comments
Closed
Assignees
Labels

Comments

@makiBaraba
Copy link

When I generate csv, first two rows (if showColumnHeaders: true) or first row if showColumnHeaders: false is removed all blank spaces from string.
products (4).csv

@alexcaza
Copy link
Owner

Which version of the library are you running @makiBaraba?

I tested this with v1.2.4, and the output is as expected—with spaces in tact.

I added some test cases (#102) to catch any possible regressions in the future, but you can see the CI tests passed without change to the library code.

Here's the action complete if you'd like to check: https://github.com/alexcaza/export-to-csv/actions/runs/8801913483/job/24156419369

There's also this Stackblitz using v1.2.4 if you'd like to see the output yourself: https://stackblitz.com/edit/vitejs-vite-u9lsey?file=src%2Fmain.ts

@makiBaraba
Copy link
Author

It seems that it works with download function, I try to implement it inside chrome extension mechanism, and use chrome.downloads API and this error ocurred.

@alexcaza
Copy link
Owner

Gotcha! Thanks, @makiBaraba. I'm not familiar with that part of the extensions API. I'll see if I can reproduce it in a reduced test case when I can and get back to you.

@alexcaza
Copy link
Owner

@makiBaraba I created a repo with a simple Chrome extension that uses the chrome.downloads API and export-to-csv. I can't reproduce the issue.

Link to repo: https://github.com/alexcaza/chrome-ext-reduced-test-case

Feel free to share more details; like the version of export-to-csv you're running. If you can link to the code of your project, that would be even better!

@alexcaza
Copy link
Owner

I'm going to close this issue since OP hasn't responded and I can't reproduce it. Feel free to open another issue with more details if it still isn't resolved 😄

@alexcaza alexcaza closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants