Title: Reports / export spreadsheet?
Last modified: August 30, 2016

---

# Reports / export spreadsheet?

 *  Resolved [CarolineElisa](https://wordpress.org/support/users/carolineelisa/)
 * (@carolineelisa)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/)
 * Hi there!
 * I am wondering what the best way is to collate all the answers so as to understand
   the breakdown.
 * Would I need a plugin like WooCommerce’s Order/Customer CSV Export ([http://www.woothemes.com/products/ordercustomer-csv-export/](http://www.woothemes.com/products/ordercustomer-csv-export/)),
   or can it be done another way?
 * Thanks!
 * [https://wordpress.org/plugins/woocommerce-hear-about-us/](https://wordpress.org/plugins/woocommerce-hear-about-us/)

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

 *  Plugin Author [PieterC](https://wordpress.org/support/users/siteoptimo/)
 * (@siteoptimo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486273)
 * Hi Caroline,
 * It probably can be done with that plugin, or with a general (free) user csv exporter
   plugin if the source location is saved with the customer data.
 * More metrics or an aggregate overview is something we’d like to add in a next
   release. So right now, the best answer is to use a plugin as a workaround, but
   we’re working on it.
 * Regards,
 * Pieter
 *  Thread Starter [CarolineElisa](https://wordpress.org/support/users/carolineelisa/)
 * (@carolineelisa)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486301)
 * Thanks Pieter. I will have a go.
 *  Plugin Author [PieterC](https://wordpress.org/support/users/siteoptimo/)
 * (@siteoptimo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486304)
 * Hi Caroline,
 * Please report back here, in case someone else has the same question.
 * Regards,
 * Pieter
 *  Thread Starter [CarolineElisa](https://wordpress.org/support/users/carolineelisa/)
 * (@carolineelisa)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486344)
 * Of course!
 * I installed [WooCommerce Simply Order Export](https://wordpress.org/plugins/woocommerce-simply-order-export/)
   and used the following code (adapted from [this support post](https://wordpress.org/support/topic/order-date-1?replies=3))
   to add ‘Source’ to the exported spreadsheet:
 *     ```
       //Extra fields on CSV export
       function wpg_add_columns($cols) {
       	$cols['source'] = __('Source', 'themedomain');
       	return $cols;
       }
       add_filter('wpg_order_columns', 'wpg_add_columns');
   
       function wpg_add_fields($settings) {
           $settings['source'] = array(
       								'name' => __( 'Source', 'themedomain' ),
       								'type' => 'checkbox',
       								'desc' => __( 'Source', 'themedomain' ),
       								'id'   => 'source'
       							);
       	return $settings;
       }
       add_filter('wc_settings_tab_order_export', 'wpg_add_fields');
   
       function csv_write( &$csv, $od, $field ) {
       	switch( $field ) {
       		case 'source':
       				$customfield = get_post_meta( $od->id, 'source', true );
       			array_push( $csv, $customfield );
       		break;
       		default :
       			break;
       	}
       }
       add_action('wpg_add_values_to_csv', 'csv_write', 10, 3);
       ```
   
 *  Plugin Author [PieterC](https://wordpress.org/support/users/siteoptimo/)
 * (@siteoptimo)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486405)
 * Hi CarolineElisa,
 * Thanks for the follow up!
 * Regards,
 * Pieter
 *  [CocktailsCanvas](https://wordpress.org/support/users/cocktailscanvas/)
 * (@cocktailscanvas)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486527)
 * Hi Pieter and Caroline
 * If either of you could help me that would be great! I took Caroline’s advice 
   from above and added the plugin Woocommerce simple export but not sure what to
   do from here. Am I suppose to copy that additional code above and if so where
   do I place it. I really need to know where the majority of my business is coming
   but really don’t want to mess up my website by doing something wrong, Thanks 
   again in advance.
 *  Plugin Author [PieterC](https://wordpress.org/support/users/siteoptimo/)
 * (@siteoptimo)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486530)
 * Hi,
 * You could add the code of Caroline to your functions.php file in your template
   folder or use a custom plugin for it.
 * Have you noticed that with our latest update we added an extra column with the
   source visible from the overview? Maybe that might help too.
 * Regards,
 * Pieter

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

The topic ‘Reports / export spreadsheet?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-hear-about-us_81a22d.
   svg)
 * [WooCommerce Hear About Us](https://wordpress.org/plugins/woocommerce-hear-about-us/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-hear-about-us/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-hear-about-us/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-hear-about-us/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-hear-about-us/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-hear-about-us/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [PieterC](https://wordpress.org/support/users/siteoptimo/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/reports-export-spreadsheet/#post-6486530)
 * Status: resolved