Published by Arif Isnaeni on 31 Oct 2008
Membuat file Excel (*.xls) dari PHP
untuk membuat file excel langsung dari php anda dapat mencoba menggunakan script berikut ini:
<?
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=namaFile.xls");
//isi file excel (pakai tabel)
echo "<table>
<tr>
<td>Cols 1 dan Rows 1</td>
</tr>
<tr>
<td>Cols 2 dan Rows 2</td>
</tr>
</table>
";
//bisa juga pakai Xml
?>
script tersebut, juga dapat anda download di sini .





