On Thu, November 16, 2006 1:25 pm, amit hetawal wrote: > Am pretty new to the world of PHP. And am now stuck. > Its like i am displayin the data from a database on to my webpage in > the form of tables. > but now i also want an option for the user to download the above data > into an excel format for the offline use. I dont want to create the > excel file for each of the webpage i am displaying as they are all > dynamic so there can be many. > is there a way so that only if user click the given link at the bottm > of the page then only the data is transferred to excel. > i.e how to i write the displayed data dynamically to the excel without > storing anything on the server. > I am able to config the pear:excelwriter but dont know hwo to get it > working according to my requirements. Yes, you will need to run the query twice, unless you want to cache the excel output on the server, possibly in a $_SESSION value. http://php.net/session_start I also would encourage you to use CSV, which will import into Excel very smoothly, but also provide the data to non-Excel users, unless you have specific formatting needs that excelwriter covers. You may also wish to explore publishing the data as an RSS feed, so that even more data aggregtors can easily import it. Plus you'll be oh-so-cool web-2.0-ish that way. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php