
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
		<script src="<?php echo base_url() ?>assets/table2excel/jquery.table2excel.js"></script>
<div>
<table border="1px" class="table2excel">
    <thead>
        <tr>
            <th>No</th>
            <th>Merk</th>
            <th>Jenis Produk</th>
            <th>Produk</th>
            <th>Part Number</th>
            <th>Stok</th>
            <th>Satuan</th>
            <th>Umur</th>
            <th>Lot Number</th>
            <th>Expired</th>
            <th>Gudang</th>
        </tr>
    </thead>
    <tbody>
        <?php 
        $a=1;
        foreach($hasil as $h){
        ?>
        <tr>
            <td><?php echo $a?></td>
            <td><?php echo $h['merk']?></td>
            <td><?php echo $h['jp']?></td>
            <td><?php echo $h['produks']?></td>
            <td><?php echo $h['part_number']?></td>
            <td><?php echo $h['stok']?></td>
            <td><?php echo $h['satuans']?></td>
            <td><?php echo $h['umur']?></td>
            <td><?php echo $h['lot_number']?></td>
            <td><?php echo tglindo($h['expired'])?></td>
            <td><?php echo $h['gudangs']?></td>
        </tr>
        <?php 
        $a++;
        }
       ?>
    </tbody>
</table>
</div>
<script>
			$(function() {
				$(".table2excel").table2excel({
					exclude: ".noExl",
					name: "Excel Document Name",
					filename: "myFileName.xls",
					fileext: ".xls",
					exclude_img: true,
					exclude_links: true,
					exclude_inputs: true
				});
                                
    window.history.back();
});
    </script>