Skip to content

Instantly share code, notes, and snippets.

@tyssen
Created August 2, 2014 04:05
Show Gist options
  • Select an option

  • Save tyssen/43f7218c0ca6ecdc32e3 to your computer and use it in GitHub Desktop.

Select an option

Save tyssen/43f7218c0ca6ecdc32e3 to your computer and use it in GitHub Desktop.

Revisions

  1. tyssen created this gist Aug 2, 2014.
    22 changes: 22 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    <?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>