<input type="button" onclick="tableToExcel('tabla-activos', 'W3C Example Table', 'myfile.xls')" value="Export to Excel" class="btn btn-info btn-xs">
<table class="table table-bordered table-striped table-hover table-responsive table-condensed" style="font-size: x-small;" id="tabla-activos">
    <thead>
        <tr>
            <th>#</th>
            <th>REINS</th>
            <th>MEN</th>
            <th>CVE ALUMNO</th>
            <th>NOMBRE DEL ALUMNO</th>
            <th>FECHA</th>
            <th>NIVEL</th>
            <th>GRADO</th>
        </tr>
    </thead>
    <tbody>
        {% set tipoUsuario = app.session.get('rol') %}
        {% for d in datos %}
            <tr>
                <td style="vertical-align: middle;">{{loop.index}}</td>
                {% if d[1].staPag == 1 %}
                    <td class="text-center" style="vertical-align: middle;background-color: red;"><b>NO</b></td>
                {% elseif d[1].staPag == 2 %}
                    <td style="vertical-align: middle;background-color: green;"><b>${{d[1].monto-d[1].recargos}}</b> ${{d[1].recargos}}</td>
                {% elseif d[1].staPag == 69 %}
                    <td style="vertical-align: middle;background-color: blue;">{{d[1].idePag}}</td>
                {% else %}
                    <td style="vertical-align: middle;background-color: yellow;">{{d[1].idePag}}</td>
                {% endif %}
                {% if d[2].staPag == 1 %}
                    <td class="text-center" style="vertical-align: middle;background-color: red;"><b>NO</b></td>
                {% elseif d[2].staPag == 2 %}
                    <td style="vertical-align: middle;background-color: green;"><b>${{d[2].monto-d[2].recargos}}</b> ${{d[2].recargos}}</td>
                {% elseif d[2].staPag == 69 %}
                    <td style="vertical-align: middle;background-color: blue;">{{d[2].idePag}}</td>
                {% else %}
                    <td style="vertical-align: middle;background-color: yellow;">{{d[2].idePag}}</td>
                {% endif %}
                <td style="vertical-align: middle;">
                    <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;">{{d[0].cveAlu.cveCtl}}</a>
                    {% if tipoUsuario == 3 %}
                        <a href="{{path('vista_pago',{cveCtl:d[0].cveAlu.cveCtl})}}" class="btn btn-xs btn-success" target="_blank" data-toggle="tooltip" title="Ir a Caja..." data-placement="right">$</a>
                    {% endif %}
                </td>
                <td style="vertical-align: middle;">{{d[0].cveAlu.apePat}} {{d[0].cveAlu.apeMat}} {{d[0].cveAlu.nomAlu}}</td>
                <td style="vertical-align: middle;">{{d[0].cveAlu.fecIns | date('d-m-Y')}}</td>
                <td style="vertical-align: middle;">{{d[0].cveAlu.cveLic.nomLic}}</td>
                {% if d[0].cveAlu.tipoAlumno == 2 %}
                    <td style="vertical-align: middle;">{{d[0].cveAlu.cveNumApli.numeroAplicacion}}</td>
                {% else %}
                    <td style="vertical-align: middle;">{{d[0].cveAlu.numero}}</td>
                {% endif %}

            </tr>
        {% else %}
            <tr class="text-center">
                <td colspan="5"> NO HAY ALUMNOS ``(°.°)´´</td>
            </tr>
        {% endfor %}
    </tbody>
</table>