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.

Excel export enter gives new line?

  1. Hi,

    When i export entries to an excel file the enters in textarea's gives new lines? Is it possible to solve this?

    Kind regards,
    Alco

    Posted 11 years ago on Tuesday June 11, 2013 | Permalink
  2. Matthijs92
    Member

    I also have this problem.
    Is there a solution for?

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  3. Matthijs92
    Member

    Yes, I have fixed it:
    add the follow lines to functions.php

    add_filter("gform_save_field_value", "save_field_value", 10, 4);
    function save_field_value($value, $lead, $field, $form){
    $new_value = str_replace(array("\n", "\t","\r"), ' ', $value);
    return $new_value;
    }

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  4. David Peralty

    Good solution, though of course it means that any block of text given to you by your users will show up without any line breaks, but that should make Excel happy.

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  5. Hi Matthijs,

    Thx for the solution!

    Although its maybe a better idea to call a simalair function when the excel export is made? (maybe a function that makes it possible to choose?)

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  6. David Peralty

    We tried to keep our export system as simple as possible. We will look at making it more feature filled in the future. All my best!

    Posted 11 years ago on Thursday June 20, 2013 | Permalink

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