- Beranda
- Komunitas
- Tech
- Programmer Forum
[ASK] Datatable Export ke Excel


TS
dhiemazzdmx
[ASK] Datatable Export ke Excel
Misi mastah-mastah semuanya..
Ane newbie nih di programming..ane mau nanya soal export ke excel di datatable tuh bisa di server side ama client side ga??
Ane udah nyobain by examples di datatables.net berhasil, cuma pas dicobain di program ane kok ga berhasil yahh..
Ane pengen export ke excel hasil datatables yang udah difilter ama ane.
Mohon bantuannya agan mastah semuanyaS E N S O Ri bawah ane udah cantumin kodingnya..
makasih
Ane newbie nih di programming..ane mau nanya soal export ke excel di datatable tuh bisa di server side ama client side ga??
Ane udah nyobain by examples di datatables.net berhasil, cuma pas dicobain di program ane kok ga berhasil yahh..
Ane pengen export ke excel hasil datatables yang udah difilter ama ane.
Mohon bantuannya agan mastah semuanyaS E N S O Ri bawah ane udah cantumin kodingnya..
makasih
Code:
<!DOCTYPE html>
<html>
<head>
<title>SOFRTB DataTables</title>
<link rel="stylesheet" type="text/css" href="jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="ColumnFilterWidgets.min.css">
<link rel="stylesheet" type="text/css" href="ColumnFilterWidgets.css">
<link rel="stylesheet" type="text/css" href="buttons.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="testjquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="dataTables.csv.css">
<body>
<h3>Data Sales Order FRTB</h3>
<div class="table-responsive">
<table class="table" id="dataTables" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>ACTION</th>
<th>INDEX SALES ORDER</th>
<th>SALES ORDER</th>
<th>TANGGAL FRTB</th>
<th>NO BATCH</th>
<th>COMMIT TRANSACTION DATE</th>
<th>ACTUAL ETD</th>
<th>ACTUAL ETA</th>
<th>WAREHOUSE</th>
<th>NO MR</th>
<th>REMARK</th>
</tr>
</thead>
<tbody>
<?php
$sql=mysql_query("SELECT * FROM detail_so_targetbatch");
while ($tampil=mysql_fetch_array($sql)) {
?>
<tr>
<td>
<a class="btn btn-info" href="?page=formSOFRTB_add&index_so=<?php echo $tampil['index_so']?>" role="button">EDIT</a>
</td>
<td><?php echo $tampil['index_so']?> </td>
<td><?php echo $tampil['sales_order']?> </td>
<td><?php echo $tampil['tanggal_frtb']?> </td>
<td><?php echo $tampil['no_batch']?> </td>
<td><?php echo $tampil['commit_trans_date']?> </td>
<td><?php echo $tampil['actual_etd']?> </td>
<td><?php echo $tampil['actual_eta']?> </td>
<td><?php echo $tampil['warehouse']?> </td>
<td><?php echo $tampil['no_mr']?> </td>
<td><?php echo $tampil['remark']?> </td>
</tr>
<?php
}
?>
</tbody>
</table>
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed]
$(document).ready(function() {
$('#dataTables').DataTable( {
sDom: 'W<"clear">Blfrtip',
"oColumnFilterWidgets": {
"aiExclude": [ 0 ]
},
buttons: ['excelHtml5']
} );
} );
[removed]
</body>
</html>
0
2.6K
8


Komentar yang asik ya
Urutan
Terbaru
Terlama


Komentar yang asik ya
Komunitas Pilihan