<?php	
    header("Content-type: application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename=Template {$tabel->name}.xls");
    header("Pragma: no-cache"); 
    //dd($records);
  ?>

  <table border="1" width="100%">
    <tr style="text-align: center; font-weight:bold; vertical-align:middle;">
        <td colspan="{{ count($kolom)+1 }}">{{ $tabel->name }} - {{date('Y')-1}}</td>
    </tr>
    <tr style="vertical-align:middle;">
        <td style="background:#ddd;" width="3%">No</td>
        @foreach ($kolom as $dataKolom)
            <td style="background:#ddd;">{{$dataKolom->name}}</td>
        @endforeach
    </tr>
  </table>