Hi,
I am trying to save my query results into MS Excel format by using the following code.
It works on the 1st attempt, but however when i tried to save it again by making another query, i received this warning message: Cannot modify header information - headers already sent by (output started at C:\Program Files\EasyPHP5.3.0\www\phpexcel3.php:178) in C:\Program Files\EasyPHP5.3.0\www\phpexcel3.php on line 256
Can anyone able to advise me where is my mistake is? Cheers
my header script is :
header("Content-type: application/octet-stream");
# replace excelfile.xls with whatever you want the filename to default to
header("Content-Disposition: attachment; filename=excelfile.xls");
header("Pragma: no-cache");
header("Expires: 0");