
17/05/2011, 19:58
|
| | Fecha de Ingreso: agosto-2009 Ubicación: Lima
Mensajes: 226
Antigüedad: 15 años, 6 meses Puntos: 3 | |
Respuesta: Problema para generar archivos .xls(excel) y php hola amix yo lo hago asi:
function organos($tipo){
$query3 = $this->organos_model->getAllByOficina();
$data['organos'] = $query3;
if($tipo=="xls"){
header( "Content-type: application/x-excel; ");
header("Content-Disposition: attachment; filename=reporte_organos.xls");
header("Pragma: no-cache");
header("Expires: 0");
}else if($tipo=="html"){
header ('meta http-equiv="Content-Type" content="text/html; charset=utf-8"');
}else if($tipo=="pdf"){
header( "Content-type: application/pdf; ");
header("Content-Disposition: attachment; filename=reporte_organos.pdf");
header("Pragma: no-cache");
header("Expires: 0");
}
$this->load->view('organos_report',$data);
}
saludos |