Professional Web Applications Themes

PHP, Excel, jpgraph - can the graph be included in the Excel output? - PHP Development

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 ([url]http://www.aditus.nu/jpgraph/[/url]) 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 ...

  1. #1

    Default PHP, Excel, jpgraph - can the graph be included in the Excel output?

    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
    ([url]http://www.aditus.nu/jpgraph/[/url]) 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
    Jay Blanchard Guest

  2. #2

    Default Re: [PHP] PHP, Excel, jpgraph - can the graph be included in theExcel output?

    You need a class that can create xls files with images.
    Or you can create a Web Archive:
    [url]http://officeupdate.microsoft.com/office/webarchive.htm[/url]

    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
    > ([url]http://www.aditus.nu/jpgraph/[/url]) 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
    >
    Marek Kilimajer Guest

Similar Threads

  1. How do you export a Flex graph to Excel?
    By DIGITALUnderworld in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 1st, 03:44 PM
  2. Output to Excel spreadsheet
    By toby007 in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: July 21st, 11:39 AM
  3. output to Excel
    By Jackson Miller in forum PHP Development
    Replies: 2
    Last Post: September 16th, 09:40 PM
  4. Replies: 1
    Last Post: July 14th, 03:00 PM
  5. excel graph inside ASP....
    By Snehal P in forum ASP
    Replies: 3
    Last Post: July 1st, 06:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139