<?php
include '../koneksi.php';
header("Content-Type: application/vnd-ms-excel");
header("Content-Disposition: attachment; filename=data_project.xls");
?>

<table border="1">
<tr>
  <th>No</th>
  <th>Nama Project</th>
  <th>Klien</th>
  <th>Nilai</th>
  <th>Status</th>
</tr>

<?php
$no=1;
$q=mysqli_query($koneksi,"SELECT * FROM project");
while($d=mysqli_fetch_array($q)){
?>
<tr>
  <td><?= $no++ ?></td>
  <td><?= $d['nama_project'] ?></td>
  <td><?= $d['klien'] ?></td>
  <td><?= number_format($d['nilai_project'],0,',','.') ?></td>
  <td><?= $d['status'] ?></td>
</tr>
<?php } ?>
</table>
