@anonymous-piwik-user opened this Issue on March 13th 2009

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-piwik-user commented on March 13th 2009

Attachment: CSV File
20piwik-report-export.csv

@anonymous-piwik-user commented on March 13th 2009

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

@robocoder commented on March 13th 2009 Contributor

This is one of the better write ups on the CSV pseudo-standard:

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 commented on March 23rd 2009 Owner

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

This Issue was closed on March 23rd 2009
Powered by GitHub Issue Mirror