Re: generate xls file on fly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hiep Nguyen wrote:

> is there anyway to generate this into xls file w/o using fopen &
> fwrite to the server?  my goal is to have a link after the table and
> user can click on that link and a save window pop up to allow user to
> save to local disk.

Yes - have a link like this:

<a href="<yourscript.php?parameters>">Get XLS file</a>

in yourscript.php, you evaluate the parameters given and build the XSL
file as output:

header("Content-Type: application/excel");
header("Content-Disposition: attachment; filename=\"filename\"");

print 
.
.
.
.
.


done.


/Per Jessen, Zürich

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux