Re: PHP, Excel, jpgraph - can the graph be included in the Excel output?
| From: | Marek Kilimajer | Date: | Mon, 14 Jul 2003 14:34:31 +0000 |
| Subject: | Re: PHP, Excel, jpgraph - can the graph be included in the Excel output? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155086@lists.php.net to get a copy of this message | ||
You need a class that can create xls files with images.
Or you can create a Web Archive: http://officeupdate.microsoft.com/office/webarchive.htm
Jay Blanchard wrote:
Good morning! I have several reports that are generated using PHP & MySQL for which I would like to include a graph using the excellent jpgraph (http://www.aditus.nu/jpgraph/) class for PHP. <?php ob_start(); // excel headers header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: inline; filename=\"excel.xls\""); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); print("Excel Test Graph\n"); print(date("Y-m-d") . "\n\n"); print("\n\n\n"); ob_end_flush(); ?> <img src="graph.php"> The file output for Excel is in the tab delimited format and the IMG tag is what calls the graph. I have tried many things to get the graph to appear in the spreadsheet, but to no avail. Can someone point me in the right direction? A huge thanks in advance! Jay