[eluser]vitoco[/eluser]
the format file that you wanna output isn't XLS, it's CSV ( comma or tab separated )
Code:
header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Content-type:application/vnd.ms-csv");
header ("Content-Disposition: attachment; filename=CSV_FILENAME.csv" );
Saludos