Title: CSV Export not working
Last modified: August 21, 2016

---

# CSV Export not working

 *  [cpaprotna](https://wordpress.org/support/users/cpaprotna/)
 * (@cpaprotna)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/csv-export-not-working/)
 * I am trying to export my form data to a CSV file and when I open the .CSV in 
   excel, it puts everything in 1 or two columns instead of opening the file in 
   the correct columns. If you are creating the file as a .CSV, it should open properly
   as a .CSV file.
 * In order to view it almost correctly, I have to rename the file to a .TXT file
   so that Excel will ask the format of the file. Even opening it this way, not 
   all of the columns are formatted correctly. Large text fields cause an issue 
   with wrapping to another row if someone enters a carriage return in a field.
 * The site is currently on 3.5.2, but I will be upgrading to 3.6 soon.
 * [http://wordpress.org/plugins/wordpress-form-manager/](http://wordpress.org/plugins/wordpress-form-manager/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [cpaprotna](https://wordpress.org/support/users/cpaprotna/)
 * (@cpaprotna)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070842)
 * Anyone? This is an issue for our client who is not very computer savy.
 *  [eeidsness](https://wordpress.org/support/users/eeidsness/)
 * (@eeidsness)
 * [13 years ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070866)
 * This was a few weeks ago, but I had the same trouble. I fixed some lines of code
   in the plugin to work for me. I can’t guarantee i will work for you.
 * In short,
    I changed the header to be text/csv I removed the line that encoded
   the file as UTF-16LE I made the file COMMA delimited, not Tab. Since it’s a COMMA
   Separated Values file.
 * line 36 in getcsv.php:
    header(“Content-type: text/csv”); //change application
   to text
 * line 1039 in db.php:
    fputcsv($fp, $csvRow); //remove the chr(9)
 * line 1058: in db.php
    comment out the line like this //$str = chr(255).chr(254).
   mb_convert_encoding( $str, ‘UTF-16LE’, ‘UTF-8’);
 * It still opens in Excel.
 *  Thread Starter [cpaprotna](https://wordpress.org/support/users/cpaprotna/)
 * (@cpaprotna)
 * [13 years ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070872)
 * THANK YOU! That worked perfectly. Developers please make this change in your 
   next update
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070883)
 * [@eeidsness](https://wordpress.org/support/users/eeidsness/), Excel 07 and 10
   will not open files containing international characters properly if generated
   as suggested above (they need the line that converts the encoding). [This StackOverflow thread](http://stackoverflow.com/questions/4348802/how-can-i-output-a-utf-8-csv-in-php-that-excel-will-read-properly)
   explains why I did what I did, though there are many options that might be more
   portable.
 * [@cpaprotna](https://wordpress.org/support/users/cpaprotna/), If you could tell
   me exactly what version of Excel and OS you are using, I could try to recreate
   the problem. The generated files were designed to open properly by ‘double click’
   rather than importing… I just assumed a naive user would do it this way, so I
   tried to make it easy for them.
 *  Thread Starter [cpaprotna](https://wordpress.org/support/users/cpaprotna/)
 * (@cpaprotna)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070884)
 * I’m not sure what operating system and version of excel my client is using, but
   I replicated this very easily with Chrome, Windows 7 and Excel 2007. T The file
   was opened via a double click.
 * For me, the fix above is better than accounting for international characters.
   The site will not have too many international characters.

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘CSV Export not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-form-manager.svg)
 * [Form Manager](https://wordpress.org/plugins/wordpress-form-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-form-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-form-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-form-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-form-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-form-manager/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [cpaprotna](https://wordpress.org/support/users/cpaprotna/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/csv-export-not-working/#post-4070884)
 * Status: not resolved