Created
August 2, 2014 04:05
-
-
Save tyssen/43f7218c0ca6ecdc32e3 to your computer and use it in GitHub Desktop.
Export XLS/CSV from EE template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-type: application/vnd.ms-excel"); | |
header("Content-Disposition: attachment; filename=enrolments.xls"); | |
header("Pragma: no-cache"); | |
header("Expires: 0"); | |
?> | |
<table> | |
<thead> | |
<tr> | |
<th>First name</th> | |
<th>Last name</th> | |
</tr> | |
</thead> | |
<tbody> | |
{exp:channel:entries channel="enrolments" disable="categories|member_data|pagination|trackbacks" dynamic="no"} | |
<tr> | |
<td>{first_name}</td> | |
<td>{last_name}</td> | |
</tr> | |
{/exp:channel:entries} | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment