Title: [Plugin: Export to Excel] Export Custon Fields
Last modified: August 20, 2016

---

# [Plugin: Export to Excel] Export Custon Fields

 *  [DirtyPete](https://wordpress.org/support/users/dirtypete/)
 * (@dirtypete)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/)
 * Hi guys,
    great plugin. I’m wondering if you could add the functionality to also
   export custom fields as their own columns. My site has a “place” post type, with
   custom fields for phone, email, address, etc. I’d like to be able to export a
   spreadsheet of custom post type that includes columns for each custom field. 
   [http://www.westernslopesvt.org/place/valley-stage/](http://www.westernslopesvt.org/place/valley-stage/)
 * Thanks!
 * [http://wordpress.org/extend/plugins/export-2-excel/](http://wordpress.org/extend/plugins/export-2-excel/)

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

 *  Plugin Author [Kapil Chugh](https://wordpress.org/support/users/kapilchugh/)
 * (@kapilchugh)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/#post-2921490)
 * Thx a lot for your suggestion.
 * Sure, we’ll integrate it ASAP.
 *  [Christiann](https://wordpress.org/support/users/xiann/)
 * (@xiann)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/#post-2921690)
 * I just added custom fields to mine like this:
 * In includes/loop.php, I changed the part from lines 38-48 (starting $str.=’ …)
   to this:
 *     ```
       $str.= '
                 <tr>
                   <td>' . mb_convert_encoding(get_the_title(), 'HTML-ENTITIES', 'UTF-8') . '</td>
                   <td>' . mb_convert_encoding($post->post_content, 'HTML-ENTITIES', 'UTF-8') . '</td>
                   <td>' . get_permalink() .'</td>
                   <td>' . get_the_date('Y-m-d', '', '', FALSE) .'</td>
                   <td>' . get_the_author() .'</td>
                   <td>' . $all_cats . '</td>
                   <td>' . $all_tags . '</td>';
   
       // post meta add
       $custom_field_keys = get_post_custom_keys(get_the_ID());
       foreach ( $custom_field_keys as $key => $value ) {
       	$valuet = trim($value);
       	if ( '_' == $valuet{0} )
           continue;
           $str .= '<td>'.mb_convert_encoding(get_post_meta($post->ID,$value,true),'HTML-ENTITIES', 'UTF-8').'</td>';
       }	
   
               $str .='
                 	</tr>';
       ```
   
 * Seems to work. Thanks for the plugin!
 *  [stl99](https://wordpress.org/support/users/stl99/)
 * (@stl99)
 * [13 years ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/#post-2921704)
 * Hi there,
 * Any plans to add custom field support anytime soon?
 * Cheers,
    Thomas
 *  Plugin Author [Kapil Chugh](https://wordpress.org/support/users/kapilchugh/)
 * (@kapilchugh)
 * [13 years ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/#post-2921707)
 * Not sure right now 🙁

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

The topic ‘[Plugin: Export to Excel] Export Custon Fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/export-2-excel_e0eff6.svg)
 * [Export to Excel](https://wordpress.org/plugins/export-2-excel/)
 * [Support Threads](https://wordpress.org/support/plugin/export-2-excel/)
 * [Active Topics](https://wordpress.org/support/plugin/export-2-excel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/export-2-excel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/export-2-excel/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Kapil Chugh](https://wordpress.org/support/users/kapilchugh/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/plugin-export-to-excel-export-custon-fields/#post-2921707)
 * Status: not resolved