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

Matching item delimiter and decimal point (comma) messes up CSV export #7986

Closed
simonberger opened this Issue Mar 10, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@simonberger

simonberger commented Mar 10, 2018

CSV Export creates a bad file if the defined or calculated decimal point matches the defined item delimiter.
In a change or patch some time ago you already set the default delimiter to ";" if the decimal point is "," but the it still fails if the delimiter has been defined by the user.

Codeblock
https://github.com/highcharts/highcharts/blob/master/js/modules/export-data.src.js#L496

Unimportant optimization but I noted there can be a if / else if on this type checking too.

@pawelfus

This comment has been minimized.

Contributor

pawelfus commented Mar 12, 2018

Hi @simonberger

Thank you for reporting the issues. You most probably refer to #7448 issue. Could you explain the case a bit more? You mean, you set manually exporting.csv.itemDelimiter to , and now it can break exported CSV's?

@simonberger

This comment has been minimized.

simonberger commented Mar 12, 2018

@pawelfus
Yes that looks like the issue to this fix I saw.
But as described it fixes just the default behaviour. If I force the usage of a comma it is still broken.
I modified the example of your linked issue to demonstrate the problem.

http://jsfiddle.net/3hgd5hu2/1/

Quotes has to be added to those columns. For example like this simonberger/export-csv@8a21717

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