listo mira, tambien lo puse asi:
Código PHP:
if( ! empty($_GET['exportar']) )
{
header("Content-Type: application/vnd.ms-excel");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment;filename=nombredelarchivoagenerar.xls");
}
echo " <LINK HREF='estilo.css' REL='stylesheet' TYPE='text/css'>\n";
echo "<table border=\'1\' align='center' width=\"750\">".empty($_GET['exportar'])?'<a href="Psicologia.php?exportar=1">Exportar</a>':''."\n <tr bgcolor='#669933'>
<th id='etiqueta1' class='etiqueta1'>Fecha</th>\n <th id='etiqueta1' class='etiqueta1'>Titulo</th>\n <th id='etiqueta1' class='etiqueta1'>Autor</th>\n <th id='etiqueta1' class='etiqueta1'>ISBN</th>\n <th id='etiqueta1' class='etiqueta1'>Clasificacion</th>\n <th id='etiqueta1' class='etiqueta1'>Año</th>\n </tr>\n";
while($valor = odbc_fetch_array($result))
{
$Fecha = $valor['Fecha'];
$Titulo = $valor['Titulo'];
me sale el enlace, la informacion, pero no sale la tabla