PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Changing CSV delimiter

  1. Is there any easy way to change CSV delimiter to semicolon instead of comma?

    When using locales where comma is used as a decimal separator, Excel does not import CSVs with multline text fields correctly. Instead of writing every line inside a single cell, Excel separates them to multiple cells and messes whole table structure. When using semicolon as a CSV delimiter, it works fine.

    Posted 12 years ago on Tuesday June 7, 2011 | Permalink
  2. dennis@oatmeal.nl
    Member

    I just figured out a hack because I had the same problem.
    What I did is strip the newline out of the values and replace them with some spaces. It works for me with excel 2003.

    look for the file export.php in the folder gravityforms.

    arround line 492
    change:

    $lines .= '"' . str_replace('"', '""', $value) . '",';

    into:

    $strippedValue = preg_replace('/\r\n/', '    ', $value) ;
    $lines .= '"' . str_replace('"', '""', $strippedValue) . '",';

    good luck

    Posted 12 years ago on Tuesday June 7, 2011 | Permalink
  3. Thanks Dennis! Would love to see a solution that's more solid with upgrades and all..

    Posted 12 years ago on Sunday June 26, 2011 | Permalink
  4. Currently there is no hook for this, but I have added it to our to do list for the next major feature release.

    Posted 12 years ago on Monday June 27, 2011 | Permalink

This topic has been resolved and has been closed to new replies.