Re: Pasar a excel
| From: | Pablo E. Siciliano | Date: | Thu, 14 Aug 2003 17:53:52 +0000 |
| Subject: | Re: Pasar a excel | ||
| References: | 1 2 3 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-39403@lists.php.net to get a copy of this message | ||
Que tendrías que pasarle:
header ("Content-Disposition: attachment; filename=nombredealchivo\n\n");
y
header ("Content-Length: ".filesize("path_completo_al_archivo"));
----- Original Message -----
From: "Marcelo Oscar Olcese" <molcese@ancal.com.ar>
To: <lista@phpes.com>
Sent: Thursday, August 14, 2003 2:00 PM
Subject: [PHP-ES] Pasar a excel
> Estimados:
>
> Buscando en la lista encontré este código para pasar el resultado de mi
> busqueda en PHP con MySQL a Excel.
> <?phpheader('Content-type: application/vnd.ms-excel');
> echo "<table border=1";
> echo "<tr>";
> echo "<th>Titulo 1</th>";
> echo "</tr>";echo "<tr>";
> echo "<TD>Valor 1</TD>\n";
> echo "</tr>";
> echo "</table>";
> ?>
> Todo muy bonito, pero el tema es que se abre la planilla de excel dentro
del
> navegador y no me aparece la opción de guardar el archivo excel.
> Que estoy haciendo mal?
> Gracias.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/03