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

Misaligned data when exported in CSV #609

Closed
anonymous-matomo-user opened this issue Mar 13, 2009 · 4 comments
Closed

Misaligned data when exported in CSV #609

anonymous-matomo-user opened this issue Mar 13, 2009 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

I am downloading data from piwik using API and in csv format.
However, at certain places, e.g. row 42, 56, 66 in attached file, the data is shifted to undesired columns stopping me from processing.
Keywords: csv

@anonymous-matomo-user
Copy link
Author

Attachment: CSV File
[20piwik-report-export.csv](http://issues.piwik.org/attachments/609/20piwik-report-export.csv)

@anonymous-matomo-user
Copy link
Author

Sorry, my bad.
The data set contains commas, reason enough for misalignment.

@robocoder
Copy link
Contributor

This is one of the better write ups on the CSV pseudo-standard:
- http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm

Proposed changes to /core/DataTable/Renderer/Csv.php:
- escape double quotes (" becomes "")
- wrap any field with double quotes if it contains comma or double quotes

Proposed test cases added to /tests/core/DataTable/Renderer.test.php:
- field with no double quotes or commas
- field with comma
- field with double quotes
- field with commas and double quotes

@mattab
Copy link
Member

mattab commented Mar 23, 2009

(In 1008) – fixed #609 Misaligned data when exported in CSV
thanks vipsoft for your pre-analysis and suggestions

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants