Ninja Forms already has a built in CSV export. But in some cases CSV is a little bit tricky:
- Non-latin characters are displayd wrong by Excel
- Multi-line entries expand to two lines in Excel
- Kommas in the input values split text to multiple columns
Export example
I created a few entries in the default contact form. When I export the values Excel pops up and wants to open the file. The result looks like this:
After I use the “Text-to-Column” button it looks like this
non-latin characters as well as multiline textareas make the result unreadable. Although it’s an Excel problem and not a CSV problem it is not user friendly and I can’t hand it out to my clients so I created a Ninja Forms extension to directly export data to Excel format.
Hi thanks.
I have fic orginal plugin v2.9.28.
Open classes/subs.php
Line 202
Replace
$label_array[0][ $field_id ] = apply_filters( ‘nf_subs_csv_field_label’, $label, $field_id );
By
$label_array[0][ $field_id ] = mb_convert_encoding(apply_filters( ‘nf_subs_csv_field_label’, $label, $field_id ), “windows-1252”);
Line 247
Replace
$value_array[ $x ][ $field_id ] = apply_filters( ‘nf_subs_csv_field_value’, $user_value, $field_id );
By
$value = apply_filters( ‘nf_subs_csv_field_value’, $user_value, $field_id );
$value = mb_convert_encoding($value, “windows-1252”);
$value_array[ $x ][ $field_id ] = $value;
++
Thanks for sharing this idea.
Hello,
we have bought your plugin yesterday, but after installing it into our websites it is not working properly. After downloading the file from the submission xlsx the file cannot be be opened,excel writes there is problem with suffex and that is why the file cannot be opened.Please let us know what to do, we have allready tried it in different computers but it is still not working.Thank you very much in advance.Veronika Polehlová
Hello, please try to open the Excel file in a text editor. Maybe there’s your PHP memory limit is to low and the file contains an error message.
Hi, new version Fix – 2.9.30
Open classes/subs.php
Line 202
Replace
$label_array[0][ $field_id ] = apply_filters( ‘nf_subs_csv_field_label’, $label, $field_id );
By
$label_array[0][ $field_id ] = mb_convert_encoding(apply_filters( ‘nf_subs_csv_field_label’, $label, $field_id ), “windows-1252”);
Line 247
Replace
$value_array[ $x ][ $field_id ] = apply_filters( ‘nf_subs_csv_field_value’, $user_value, $field_id );
By
$value = apply_filters( ‘nf_subs_csv_field_value’, $user_value, $field_id );
$value = mb_convert_encoding($value, “windows-1252”);
$value_array[ $x ][ $field_id ] = $value;
Line 268
Replace
apply_filters( ‘nf_sub_csv_delimiter’, ‘,’ ),
By
apply_filters( ‘nf_sub_csv_delimiter’, ‘;’ ), // Fix , by ;
Line 278
Replace
apply_filters( ‘nf_sub_csv_delimiter’, ‘,’ ),
By
apply_filters( ‘nf_sub_csv_delimiter’, ‘;’ ), // Fix , by ;
++
Hello,
I bought your Ninja Forms Excel Export plugin today. After installation on a WordPress 5.0.3 with Nija Form version 3.3.21.3 it does not appear in the menu.
Can you quickly tell us if your plugin is still functional?
Thank you
Hey Fab,
yes it is still functional and up to date. You should see a submenu “Excel Export” within “Ninja Forms” menu.
hI
In need to export calculating fields , do the plugin solve this ?
Hey Gabriela, yes that’s possible
Hi,
When we export a form to a csv file with the built-in functionality, we encounter the problem with the Non-latin characters, but also with html characters (ex. & instead of &). Does the plugin resolve this problem as well?
Thanks in advance for your answer.
Yes, this was one of the reasons to create the plugin.
Ok. Thanks for the reply. On the plugin page, there are different price options following the number of installations. If we have different wordpress sub-sites (http://exemple.com/subsite-01, http://exemple/subsite-02), is it considered as 2 sites or 1 site ? Thanks in advance.
If it is a Multisite installation you can activate the plugin once for all subsites. It both are independent installations you should use a license for two sites. Otherwise only one site receives updates.
I have just installed the plugin. It seems to work perfectly. Thank you!
How do I export calculations from submissions to excel spreadsheet? We have the excel plugin but the calculations field does not show up to pick as an export field.
Hey Joe,
Sorry, this is not possible yet.
best regards, Hannes