Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/05/2012, 08:48
Avatar de a_gomez
a_gomez
 
Fecha de Ingreso: marzo-2012
Ubicación: /var/www/
Mensajes: 48
Antigüedad: 12 años, 1 mes
Puntos: 2
Respuesta: exportacion de consulta mysql a exel

Cita:
Iniciado por matt_1985 Ver Mensaje
utilizando estos header podrias lograr lo que necesitas .

Código PHP:
Ver original
  1. header('Pragma: public');
  2. header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past    
  3. header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
  4. header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
  5. header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
  6. header('Pragma: no-cache');
  7. header('Expires: 0');
  8. header('Content-Transfer-Encoding: none');
  9. header('Content-Type: application/vnd.ms-excel'); // This should work for IE & Opera
  10. header('Content-type: application/x-msexcel'); // This should work for the rest
  11. header('Content-Disposition: attachment; filename="Informe.xls"');

Saludos
Gracias lo he resuelto con tu ayuda y esta explicación http://micodigobeta.com.ar/?p=372