Support

Home Forums Event Espresso Premium Custom Excel Export

Custom Excel Export

Posted: February 23, 2015 at 8:19 pm

Viewing 1 reply thread


Beth Graeme

February 23, 2015 at 8:19 pm

I want to build a class roster vs. an event details worksheet. Is there a way to make each Excel export only have attendee data?


Josh

  • Support Staff

February 24, 2015 at 10:33 am

Hi Beth,

It turns out there is, and it involves removing and modifying some of the PHP code that’s in EE3’s /includes/functions/export.php file.

If you open up this file in code editor like SublimeText, you’ll see that its two main functions are wrapped in an if (!function_exists check. This means that it checks for the function to be defined somewhere else (like in your own custom plugin) first.

The second function in that file is named espresso_export_stuff(). You can copy that function into your custom plugin, or into /wp-content/uploads/espresso/custom_functions.php to override it. Within that function you’ll find an array column headers, and later an array of attendee data. You’ll also note that each column has a PHP comment that helps you match the two.

So, as an example, if you want to remove the “Date Paid” column, you remove the column header ( you’ll note the //M comment in both).

__('Date Paid', 'event_espresso'), // M

then you remove the attendee data:

. $s . escape_csv_val(event_date_display($participant->payment_date, get_option('date_format'))) // M

Viewing 1 reply thread

The support post ‘Custom Excel Export’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso