Support

Home Forums Event Espresso Premium Export Events CSV

Export Events CSV

Posted: May 8, 2019 at 4:56 am

Viewing 13 reply threads


LarnieBee

May 8, 2019 at 4:56 am

Hey there,

I really need a way to export a list of all my events. The events are being funded by the government and they want information on how many events are being held within a time period and how many people have registered for them, including events with zero registrations.

Basically I need an export with the following columns;

Event Name
Category
Datetime
Registrations (must also include 0)

Any ideas how I can achieve this?

thanks in advance.
🙂


Josh

  • Support Staff

May 8, 2019 at 9:29 am

Hi,

What you could do is send a request via the built-in REST API, which will give you a JSON response with all the data. Then you can convert the JSON to CSV a file, then open that file in a spreadsheet application.

Step 1: Go to https://json-csv.com/
Step 2: Paste in this URL (you’ll change the example.com to match your site’s domain, and category-slug to match the event’s category slug)
https://example.com/wp-json/ee/v4.8.36/events?order_by=EVT_ID&sort=DESC&limit=200&calculate=spots_taken&include=Datetime.DTT_EVT_start,Datetime.DTT_EVT_end,EVT_name&where[Term_Taxonomy.Term.slug]=category-slug
Step 3: Click the Download button and download the file
Step 4: Open the file in your spreadsheet application

You’ll note that the above request URL will get all the events for one category, so the end results could be merged into one file. Alternatively you could do this to get all events and include the category name:

https://example.com/wp-json/ee/v4.8.36/events?order_by=EVT_ID&sort=DESC&limit=200&calculate=spots_taken&include=Datetime.DTT_EVT_start,Datetime.DTT_EVT_end,EVT_name,Term_Taxonomy.term_id,Term_Taxonomy.Term.name

Then downside with the above is it will output additional rows for each type of event taxonomy which would involve deleting them from the spreadsheet.


LarnieBee

May 8, 2019 at 10:19 pm

Hey there, thanks so much for this workaround. very cool.
🙂

Can I just ask, When I paste the below:

https://fishability.org.au/wp-json/ee/v4.8.36/events?order_by=EVT_ID&sort=DESC&limit=200&calculate=spots_taken&include=Datetime.DTT_EVT_start,Datetime.DTT_EVT_end,EVT_name,Term_Taxonomy.term_id,Term_Taxonomy.Term.name

I seem to only be getting a few of my events in this list. How can I ensure it exports ALL the events?

Also, is there anyway to get the category on the same row?

Lastly, how can I edit the columns? I only want to include the date of the event, not the time.

thank you so much!


Tony

  • Support Staff

May 9, 2019 at 4:34 am

When you say ‘a few’, would a few be 200 events?

using the above I get 200 events from your site as the request has a limit of 200 to prevent time outs, that is set with limit=200 which you can try with higher values, however, your site may timeout before the request can be complete.

How many events are you expecting?


LarnieBee

May 9, 2019 at 5:13 am

Well actually it’s 320 in total but this will grow over time. Essentially I only need this report on a monthly basis (maybe 40 events) so is there a way to date limit it?


Tony

  • Support Staff

May 9, 2019 at 6:48 am

Yes, can limit the results based on date using something like:

where[Datetime.DTT_EVT_end][BETWEEN]=2019-04-01T00:00:01,2019-05-01T00:00:01

So then the URL would be:

https://fishability.org.au/wp-json/ee/v4.8.36/events?where%5BDatetime.DTT_EVT_end%5D%5BBETWEEN%5D=2019-04-01T00:00:01,2019-05-01T00:00:01&order_by=EVT_ID&sort=DESC&limit=200&calculate=spots_taken&include=Datetime.DTT_EVT_start,Datetime.DTT_EVT_end,EVT_name,Term_Taxonomy.term_id,Term_Taxonomy.Term.name

That would show you the events between 2019-04-01 and 2019-05-01.


LarnieBee

May 10, 2019 at 5:08 am

Oh that’s very cool. Thank you. That could work. I will have a play with it.
Lastly, how can I edit the columns? I only want to include the date of the event, not the time.


Josh

  • Support Staff

May 10, 2019 at 7:11 am

You can edit the columns in your spreadsheet editor. In this case, you’d change the date format for the datetime column. The JSON response will always include the time along with the date.


LarnieBee

May 11, 2019 at 10:44 pm

wow. thats really obvious now that you say it. hahaha. thank you.


LarnieBee

May 13, 2019 at 3:47 am

I do have one last little request if you could help. I see that there is a total registrations column. Is there any way to separate out the different ticket types into columns in this report?


Tony

  • Support Staff

May 14, 2019 at 5:20 am

Hi there,

Not with the above, no.

For that kind of breakdown, you’d need to pull all of the tickets individually for each event and loop over adding the count for each ticket. It’s not something that can be added to the above without custom development (with the help of a developer) and by the time you’ve done that you may as well have developed your own custom report using our models system to pull any and all of the details you need.


LarnieBee

May 14, 2019 at 5:52 am

Interesting… Can you tell me more about the models system? Do you guys have Developers for hire that can produce this type of thing?
🙂


Josh

  • Support Staff

May 14, 2019 at 12:09 pm

Hi,

Event Espresso does not have developers for hire, but you can get a quote from one of the developers at codeable.io.


LarnieBee

May 14, 2019 at 6:37 pm

I’m on it Josh!

Talking to them now.
🙂
Thank you.

Viewing 13 reply threads

The support post ‘Export Events CSV’ 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