Web Hosting Talk







View Full Version : Generate Excel and Word files from PHP?


peachtreewebworks
09-23-2002, 06:14 AM
Someone asked me if they could use php com functions to generate excel and word files from php. I'm at a loss as to what they're talking about!

Anyone have a clue? Does php have any functions that do this?

Thanks! :)

aah-jim
09-23-2002, 01:07 PM
yes it does, aslong as you are on a windows server,
if you do a search for a tutorial you should be able to find something good.

lusid
09-24-2002, 04:02 AM
Theres more on this topic and it does not have to on a windows server, check out:
One nice way of generating a report and/or allowing your users to export the contents of a table, is to return HTML table tags as content-type Excel. This assumes the user has Excel 97 or later.

<?php
header('Content-type: application/vnd.ms-excel');
echo "<table><tr><td>hello</td><td>world</td></tr></table>";
?>
:)

Khaless
09-26-2002, 10:33 AM
http://www.php.net/manual/en/ref.com.php ??