Title: Exclude fields in export file
Last modified: April 18, 2018

---

# Exclude fields in export file

 *  Resolved [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/)
 * Hey Doeke,
 * thanks a lot for this awesome plugin!
 * I know you can exclude metadata in your export file, but how can I exclude some
   specific data. Because of data protection I would like to exclude “Name” and “
   E-Mail” from the exported file. Is it somehow possible?
 * Thanks a lot for your help!
 * Alex

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

 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10195808)
 * Hi Alex,
 * You’re welcome. I’d love for you to leave a small review, if you’d like!
 * I’m hoping to make the UX a bit friendlier for this in the future, but something
   like this can get you started:
 *     ```
       add_filter("gfexcel_field_disable", function ($disabled, $field) {
           $field_ids_to_disable = array(1, 2);
           if (in_array($field['id'], $field_ids_to_disable)) {
               $disabled = true;
           }
           return $disabled;
       }, 10, 2);
       ```
   
 * You can make this as complicated or simple as you like. If the filter receives
   a `true`, the field will be disabled.
 * Hope this helps. Let me know!
 *  Thread Starter [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10195903)
 * Hey Doeke,
 * thanks for the very quick reply! Awesome!
 * One thing I noticed, if I want to export all forms, then neither the excluding
   of metadata nor excluding of Name and E-Mail ist working. It only works if I 
   download the excel file for a single form. Would that be possible to accomplish
   it for the export of all files? That would be really great, since I always use
   the download for all forms.
 * I surely will give you a 5 star rating!
 * Thanks a lot in advance!
 * Alex
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10196263)
 * HI Alex,
 * Been debugging this for a while, and I think I got it.
 * If you could change your `gfexcel.php`-file, and change `plugins_loaded` to `
   wp_loaded`.
    I think that should solve your problem. And if this works for you,
   this will be implemented in the next version.
 * Let me know!
 *  Thread Starter [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10196850)
 * Hey Doeke,
 * really great support, I have to say!
 * I made the change and it partial worked.
 * The problem is, that after the change, I wasn’t able to export an excel file 
   of just one form. The link just vanished, when go to the settings and want to
   select result in excel.
 * Also, on some forms the email column and name column was gone but on some forms
   only the name column was gone but the email column was still there, always when
   I have captcha included in the form.
 * On forms, where I don’t have name or email in this form, other columns were gone.
   Is it possible somehow to say by column name to eclude them?
 * Another question Doeke,
    Is it somehow possible to say, off all meta data, I 
   want to keep the date, since this is no personal data? And also able to seperate
   date and time in two columns, as you did the separation of the name in two columns.
 * Cheers and thanks a lot you hanging in there!
 * Alex
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10197116)
 * Hi Alex,
 * Thanks for the feedback. Luckily it was a simple fix this time 😉
    You can revert
   the last change, and open up `src/GFExcelAdmin.php` and change line 34 (`$this-
   >handle_bulk_actions();`) to: `add_action("wp_loaded",array($this,'handle_bulk_actions'));`
 * That the trick for me, to get both working.
 * In response to your second question:
 * The filtering I gave you was just an example using the field id’s. Every form
   has its own fields, and it’s own id’s. So you have to extend the function to 
   also check against the form_id. But another option can also be, like you said,
   to filter against a fieldname, or type, or.. well, it’s a long list.
 * Something like this.
 *     ```
       add_filter("gfexcel_field_disable", function ($disabled, $field) {
           $field_names_to_disable = array('Name','Surname','Age');
           //useful filters are: $field['label'], $field['id'], $field['formId']
   
           if (in_array($field['label'], $field_names_to_disable)) {
               $disabled = true;
           }
           return $disabled;
       }, 10, 2);
       ```
   
 * To answer your last question:
 * I’m currently working on expanding on the metadata, to help with an other support
   question. I’ve almost finished this, and this will make it so that metadata fields
   are filterable, like every other field. And can also be split using a custom 
   field transformer. I really like the idea of splitting the date and time, so 
   maybe I will add a native transformer in the future.
 * Hope this helps for now. The next release will have your update, so you can just
   update when it arrives.
 *  Thread Starter [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10201414)
 * Hey Doeke,
 * I left you a review. 🙂
 * Thanks a lot for trying to solve it.
 * So the thing is running very well and the approach with naming the labels is 
   great and it looks like everything works!
 * But I also had an edge case, which it took a bit to find out.
 * One person left a comment with this special thumbs up icon
    “Tolle Webseite mach
   weiter so 💪🖒”
 * If this is somewhere in the entries, everything after this entry will be messed
   up and the following happens:
    After I download the excel file with all forms
   in it and opened the excel file, Office gives me a warning that it found a problem
   with some content and it would try to restore it if I trust it.
 * When I click yes, it opens the file and on top there is a message, that the editing
   of this file could make harm on my computer.
 * When I check the first 3 tabs (forms) in this excel file, everything looks good,
   but the fourth and all other forms are completely messed up, with almost no or
   few content and completely mixed up. After some investigation, I found out, it
   is the last specific entry with the thumbs up, which screwed the whole table.
   Maybe a think you should check on, before others have the same problem. 🙂
 * The think with metadate filterable, native transformer and splitting sounds great!
 * Thank you so much!
 * Alex
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10201430)
 * Hi Alex,
 * I saw the review, thanks a lot!
 * And thanks you for this issue. I’ll look into it. Next version uses a new excel
   renderer, so hopefully this is already fixed 😀
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10204612)
 * Hi Alex, last update 😉
 * Version 1.2.4 is out now. And as I hoped, the unicode / emojil stuff is fixed
   with the new excel renderer!
 * AND, drumroll… You can split the date and time with the following code:
    `add_filter('
   gfexcel_meta_date_created_seperated', '__return_true');`
 * Enjoy!
    -  This reply was modified 8 years, 2 months ago by [Doeke Norg](https://wordpress.org/support/users/doekenorg/).
    -  This reply was modified 8 years, 2 months ago by [Doeke Norg](https://wordpress.org/support/users/doekenorg/).
 *  Thread Starter [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10206769)
 * Oh very cool Doeke! Brilliant 🙂
 * I have another question, if you don’t mind.
 * I do have several forms, where only logged in users can fill out the forms. Each
   form collects also the user id of each user and is dynamically entered in the
   entries. So in every entry list I have the user id.
 * Is there any way to have entries of different forms exported in only one excel
   list, not seperated in tabs, but merged together in actually one sheet where 
   you have a possibility before export to select a reference field. Let’s say, 
   user id or email address or whatever. So all entries of all forms of userid 1
   will be merged in one line, userid 2 and so on.
 * Any experience with that or best way how to accomplish this?
 * Thanks a lot!
 * Alex
 *  Plugin Author [Doeke Norg](https://wordpress.org/support/users/doekenorg/)
 * (@doekenorg)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10206774)
 * Wow Alex, that is some specific stuff :D.
 * I don’t have a solution for that with the plugin. And to be honest, it’s way 
   to specific for me to include 🙂
 * I would probably write a query for this purpose, and export that as a CSV or 
   something 🙂
 *  Thread Starter [Alex Frison](https://wordpress.org/support/users/seville76/)
 * (@seville76)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10206780)
 * No problem Doeke,
 * just was thinking if this would be even possible.
 * But still blown away of your fast response! 🙂

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

The topic ‘Exclude fields in export file’ is closed to new replies.

 * ![](https://ps.w.org/gf-entries-in-excel/assets/icon.svg?rev=3434379)
 * [GravityExport Lite for Gravity Forms](https://wordpress.org/plugins/gf-entries-in-excel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gf-entries-in-excel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gf-entries-in-excel/)
 * [Active Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gf-entries-in-excel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gf-entries-in-excel/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Alex Frison](https://wordpress.org/support/users/seville76/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/exclude-fields-in-export-file/#post-10206780)
 * Status: resolved