header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=miarchivo.xls");