<?php 
header("Content-type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=LaporanTamu.xls");

?>
<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
	<tbody>
		<tr>
			<td>No</td>
			<td>Nama</td>
			<td>Asal Instansi / Alamat</td>
			<td>Nomor Handphone</td>
			<td>Keterangan</td>
			<td>Kategori</td>
			<td>Nama Bidang</td>
			<td>Tanggal</td>
		</tr>
		<?php 	 
		$no=0; foreach($laporan->result() as $row){ $no++;
		?>			
		<tr>
			<td><?php echo $no;?></td>
			<td><?php echo $row->nama;?></td>
			<td><?php echo $row->asalinstansi;?></td>
			<td><?php echo $row->nohp;?></td>
			<td><?php echo $row->keterangan;?></td>
			<td><?php echo $row->namakategori;?></td>
			<td><?php echo $row->namabidang;?></td>
			<td><?php echo date('d F Y', strtotime($row->tanggal ));?></td>
		</tr>	
		<?php }?>
	</tbody>
</table>