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.

Problem with the export messages in CSV format (french languages messages)

  1. damdo74
    Member

    Hello,
    I am having trouble with the csv export message functions. When importing in Excel, the ''Commentaires" field content is displayed on several different lines, even with some line spaces in between.

    https://www.dropbox.com/s/3dpbivswao9e79b/gform-gravity-export-problem.png

    I tried to change the separator via the functions.php but then I get a fatal error which makes my website unaccessible.
    The messages are in French.

    Thanks a lot for your help.
    Best regards
    Damdo

    Posted 12 years ago on Thursday September 27, 2012 | Permalink
  2. When you import the .csv, try to make sure that UTF-8 is selected. Maybe that will fix the problem.

    Posted 12 years ago on Thursday September 27, 2012 | Permalink
  3. damdo74
    Member

    Thanks for the quick solution but that does not help.
    I did import with UTF-8 selected but still same issue.

    Posted 12 years ago on Thursday September 27, 2012 | Permalink
  4. Could you link to a version of the .csv?

    Posted 12 years ago on Thursday September 27, 2012 | Permalink
  5. damdo74
    Member

    Hi Alsc,
    here is the link to my exported file
    https://www.dropbox.com/s/3dpbivswao9e79b/gform-gravity-export-problem.png

    thanks for your help.
    Damdo74

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  6. That is an image. I was looking for the actual .csv file, so I could try to import it in excel.

    Posted 12 years ago on Wednesday October 10, 2012 | Permalink
  7. roopys
    Member

    Hi,

    I'm having a similar issue with textarea contents.

    I'm also working with french messages, but I dont think encoding is the only problem (I think damdo74 mainly has troubles with Excel for Mac... which is not really friendly with any encoded CSV files when importing, unfortunately)

    The other issue is that exported messages (with forms containing Textarea data) are broken if the user used line-breaks or so in its message...

    Even if no special caracters seems to be in the CSV file itself, the import (both on Excel for Windows or Mac) breaks the data formats & columns when the CSV is imported...

    I tried to check the export.php file, but I could'nt really find out what to do... Is there any way to clear those line-breaks especially for messages exports ?

    Thank you very much for your help, and have a good day !

    Posted 12 years ago on Thursday October 18, 2012 | Permalink
  8. Since you are exporting a field with line breaks in it, the import of the CSV is largely dependent on the software which is used to open it. See this http://www.csvreader.com/csv_format.php for some common problems with importing CSV (especially with textareas.)

    If you have an example export you can post a link to, I can take a look and see what the data looks like and see if there is a problem with it. But a textarea can have line breaks and if it does, your import program will need to deal with it on import.

    Posted 12 years ago on Thursday October 18, 2012 | Permalink
  9. roopys
    Member

    Hello Chris,

    Thank you for your quick reply, and the precious infos you gave concerning CSV files !

    I created a pastebin to show you how the CSV file looks like (I had to change some infos concerning the clients, but no modifications concerning the data "format").
    http://pastebin.com/L5uyBm56

    As you will see, the problem is with the line-breaks that excel interprets as a new row (even if the data seems correctly delimited with double quotes)
    How can I deal with that since the CSV format works that way (1 row for 1 "info", right ?)

    When exporting messages, is it possible that Gravity Forms could "clean" those line-breaks trough a function or filter ?

    Thank you very much ! GF Rocks ;)

    Best regards,

    Posted 12 years ago on Thursday October 18, 2012 | Permalink
  10. Studio Deefuse
    Member

    I'am having the same problem. Is there a good issue ?

    Posted 12 years ago on Friday October 19, 2012 | Permalink
  11. roopys
    Member

    For the moment, i still couldn't find a good way to solve this...

    Posted 12 years ago on Wednesday October 24, 2012 | Permalink
  12. Studio Deefuse
    Member

    :(

    Posted 12 years ago on Wednesday October 24, 2012 | Permalink
  13. nicomollet
    Member

    Hello
    Same problem here.

    My form has a textarea field.
    Each line break in this textarea makes a new row when I import the CSV in Microsoft Office 2007.

    I double click on the CSV file, select the first column (A). Then choose Data > Text to Columns > Delimited > Delimiter : Comma > Text delimiter : Double-quote.

    This same file opens in LibreOffice without any column problem. But since Microsoft Office is the most common software, I would expect exports to work well with it.

    I can send you the CSV file, so you can test it and find a solution please. The data is private, how can I do that?

    Posted 12 years ago on Monday December 17, 2012 | Permalink
  14. The textarea column text will be double quoted, but it appear that Excel treats new lines within a quoted field as new lines. This is on the part of Excel and how it interprets the field. As you saw, LibreOffice handles it fine.

    You may be able to perform some processing on the CSV before you try to open it in Excel, to convert the new lines to something that Excel can handle more easily.

    Posted 12 years ago on Monday December 17, 2012 | Permalink
  15. nicomollet
    Member

    Well, I am disappointed.
    GravityForms should handle compatibilty itself.
    Microsoft Office is the leader, and I don't think my client will be pleased when I will tell him to install another program. They have their own macros/ apps running with Office. Using another program is a big let down.
    I will see if I can make it work, since I can't let my client with the broken exports.

    Posted 12 years ago on Monday December 17, 2012 | Permalink
  16. Do you have a suggestion for how Gravity Forms can better handle multiple lines of text input when exported in a CSV file? Maybe there is some way we can export the data differently. We're always open to suggestions for improvement.

    Posted 12 years ago on Monday December 17, 2012 | Permalink
  17. damdo74
    Member

    Hello,
    still no solution regarding this .csv import issue ?
    Please help

    Posted 11 years ago on Thursday April 4, 2013 | Permalink
  18. @damdo74, can you explain what is happening to you exactly? Also, if you can post a sample of your exported CSV to pastebin.com or pastie.org, we will be happy to take a look.

    Posted 11 years ago on Monday April 8, 2013 | Permalink
  19. We got this problem each time we make a Gravity form and the costumer need the data.
    Replicating the problem is easy:

    1. Just make a form that has various fields including one or more text fields.
    2. Make the form 'live' on a webpage.
    3. Now enter some data into the form from a few 'users'.
    4. In the text input fields try to enter some multi line text with line breaks -as users often do.
    5. Export the form data to a .csv file.

    If you then try to import the data into an Excel then the user data without linebreaks will import ok into each column and create a new line for each user.

    However whenever a text field got a linebreak within the "" then excel will start a new line and the data for that user gets split over one or more lines and put into the wrong columns.

    There are no simple solution to fix this in Excel so the data remains completely useless for the costumer. You can try to fix it manually but this is very hard when the form got data from thousands of users.

    One of our developers has made a routine to fix the .csv files.
    But Gravity Forms need a build in solution if we should continue to use it - as costumers must be able to export and import into Excel them self.

    A simple solution would be an option to export form data with linebreaks within "" converted into something like "</br>" or "*LB*" or "|" (maybe user specified) when exported. Then it can be imported into Excel correctly and you can then replace the code in Excel with something else.

    Posted 11 years ago on Monday May 6, 2013 | Permalink
  20. I am experiencing the same problem. When I export a .csv file that includes a "return" in a text field, Excel reads that as a new line. Is the official solution to this to not use the textarea field for user entry of paragraphs?

    My research into this problem suggests that the csv file should have "/n" for the returns. Is this not happening? Is there a way to filter out returns in the textarea fields beforre their are exported and replace them with another character?

    The form is located here:
    https://achievefoundation.org/support-us-category/fundraising/honor-your-teacher-3/

    Posted 11 years ago on Friday May 17, 2013 | Permalink