
31/08/2009, 16:09
|
| | Fecha de Ingreso: octubre-2007 Ubicación: Capital Federal
Mensajes: 215
Antigüedad: 17 años, 4 meses Puntos: 1 | |
Respuesta: Formatear tabla al exportar a Excel El código es éste:
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition: attachment; filename=file.xls");
header("Pragma: no-cache");
header("Expires: 0");
echo "<table width=\"800\">\n";
echo "<td colspan=6 align=center> ( $titulo) </td>\n";
echo "</table>";
echo "<table width=\"800\">\n";
echo "<td colspan=6 align=center> </td>\n";
echo "</table>";
echo "<table border width=\"800\">\n";
/* Aca muestro datos de BD */
echo "</table>"; |