Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/01/2010, 05:40
Avatar de andreshenao
andreshenao
 
Fecha de Ingreso: enero-2009
Ubicación: Medellìn
Mensajes: 417
Antigüedad: 15 años, 3 meses
Puntos: 7
De acuerdo Respuesta: problema al exportar excel php

huy mil gracias por la ayuda este fue el codigo que coloque y funciona perfectamente


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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>

<body>
<?php


$conexion=mysql_connect("localhost","root","1") or die(" no se realizo la conexion ");
mysql_select_db("prueba") or die ("no se encontro la base de datos ");

$opc=$select;
$vacio=0;
switch($opc)
{
case 1:
if ($consecutivofac>$vacio)
{
$consulta="select* from facturacion where consecutivofac='$consecutivofac'";

}