Re: [PHP] Generate a file

2002-07-11 Thread Miguel Cruz

On Wed, 10 Jul 2002, Phillip S. Baker wrote:
> Okay here is what I want to do.
> 
> Select the field of a database that I want.
> Hit submit.
> Execute a query of a database based on the said form.
> Gather all the data and rows and plug them into an excel generated file.
> Display a dialogue box asking the user the save the file.
> The saved file being an excel file with data generated from a database.
> 
> Make sense?
> 
> Would the header calls be something like this?
> header("Content-type: application/xls");
> header("Content-Disposition: attachment; filename=downloaded.xls");
> 
> Now if that is cool, how would I get the data into the downloaded.xls file 
> to have this work?

echo "Cell A1\tCellB1\tCellC1\n";
echo "Cell A2\tCellB2\tCellC2\n";

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Generate a file

2002-07-10 Thread Marek Kilimajer

Use BiffWriter, I don't know where it lives, you must find it yourself.

Phillip S. Baker wrote:

> Okay here is what I want to do.
>
> Select the field of a database that I want.
> Hit submit.
> Execute a query of a database based on the said form.
> Gather all the data and rows and plug them into an excel generated file.
> Display a dialogue box asking the user the save the file.
> The saved file being an excel file with data generated from a database.
>
> Make sense?
>
> Would the header calls be something like this?
> header("Content-type: application/xls");
> header("Content-Disposition: attachment; filename=downloaded.xls");
>
> Now if that is cool, how would I get the data into the downloaded.xls 
> file to have this work?
>
> Thanks
>
> Phillip
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate a file

2002-07-10 Thread Jay Blanchard

[snip]
Select the field of a database that I want.
Hit submit.
Execute a query of a database based on the said form.
Gather all the data and rows and plug them into an excel generated file.
Display a dialogue box asking the user the save the file.
The saved file being an excel file with data generated from a database.

Make sense?
[/snip]

Read this article on PHP and Excel, it may help...
http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spreadshee
ts/20/26896/index.html

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Generate a file

2002-07-10 Thread Alberto Serra

ðÒÉ×ÅÔ!

Phillip S. Baker wrote:
> Now if that is cool, how would I get the data into the downloaded.xls 
> file to have this work?

1) Save the data as a comma-separated list (pap.data.csv).
2) make an excel macro that will load it into a preexisting sheet and 
treat it
3) put the macro as the auto starter of the sheet.

ÐÏËÁ
áÌØÂÅÒÔÏ
ëÉÅ×

@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php