Posted: March 1, 2019 at 12:38 pm
|
Hi there, i’m wondering how to customize csv export. We need the export like this: https://abg-wuppertal.de/test-event-espresso/ thank you for helping us ๐ |
Hi, You can follow this code example to include only a few selected columns for the regsitrations CSV report: You can add, then modify to your specifications, the above code to a functions plugin. |
|
|
Hi Josh, thank you! This code works but i also need to display the custom questions (or all other columns) and answers for the registrants. how can i do that? what is the right code for phone number, adress etc.? thank you! |
Your screenshot did not specify that you also want to display custom questions. What you could do instead is remove the columns you don’t want to displayed. Here’s a different code snippet that you can use to remove specific fields/columns: |
|
|
Hey Josh, thank you ๐ but where do i find the names of the specific fields/columns so that i can write it down in this code snippet? For example: what is the name of phone number or adress? is it like my example: $fields_to_exclude_from_csv = array( ); ??? |
It’s the name of the columns listed at the top of the CSV. Export a CSV and view the column names here: https://monosnap.com/file/hu23Y3L5bMEAUscon5KBw0U2MqrDkL Use the column name in the |
|
|
thanks tony!!! last question ๐ |
That should happen automatically, what do you see? |
|
|
have a look: https://abg-wuppertal.de/test-event-espresso/ it’s all in one column in excel ๐ |
That’s not an issue with Event Espresso, it looks like a list delimiter issue. I’m assuming you’re in Germany so your list delimiter would be If thats the case you can add this snippet to the site to swap out to delimiter used in the CSV to be a semi colon: That can go in the same functions plugin you created for the CSV filter. Does it work then? |
|
|
Tony, wow! yes it works now! thank you very much, you made my day ๐ |
Great! I’m glad that worked ๐ Any further problems just let us know. |
|
|
Tony, sorry, got another problem… i cannot remove every specific column that i want to. i integrated this code-snippet: /* $fields_to_exclude_from_csv = array( foreach( $fields_to_exclude_from_csv as $single_field_to_exclude ) { this link will show you which csv export is generated: https://abg-wuppertal.de/test-event-espresso/ so, “Wรคhrung” is removed but many other columns are still available in the csv export like “Transaktions ID” or “Teilnehmer ID”, “Registrierungs-ID”, “Unique Code for this registration” and so on… what can i do now? Thank you again ๐ |
Please post your code to a service like Pastebin and then add the URL here, the form adds formatting and I then can’t be sure if it’s the forum or your code. Also the above is missing the filter, can you add the full code you are using, please. |
|
|
Hey Toni, here is the link: the csv export hides “Wรคhrung” but not “Transaktions ID”, you can see the export here: https://abg-wuppertal.de/test-event-espresso/ We do only need the yellow columns for our csv export. Thank you a lot!! |
Ok, the strings must match exactly, so check there are no spaces before/after the title in the CSV that isn’t being added to the titles in your code. Also change the filter from this:
To this:
|
|
|
Hi, perfect, it works now, i’m very happy ๐ thank you very much, your support is really, really great!! have a nice weekend! greets from germany |
I’m glad it’s now working ๐ I’ll mark this thread resolved, any further questions please feel free to open up another. |
|
The support post ‘Customize CSV 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.