Return to Snippet

Revision: 8792
at October 8, 2008 11:31 by stavelin

Initial Code
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-type: application/;charset:UTF-8");
header("Content-Disposition: attachment; filename=filename.xls"); 
print "\n"; // Add a line, unless excel error..
<table border="1">
<th>header 1</th>
<th>header 2</th>
<td>data 1</td>
<td>data 2 - nordic letters æ, æ, å</td>

Initial URL

Initial Description
This is saved from Gerhard Slettens weblog I just want yo keep it on snipplr so it easily can be fetched through textmate.

Initial Title
Easy Excel export from PHP

Initial Tags
php, excel

Initial Language