Create Excel chart programmatically in PHP

后端 未结 4 967
盖世英雄少女心
盖世英雄少女心 2021-01-03 10:54

Do you have any idea on how to create a chart in an Excel sheet programmatically from PHP ?

I know you can invoke the Excel COM object, but the server is running on

相关标签:
4条回答
  • 2021-01-03 11:35

    I think it's not a bad idea to use PHPs GD library like these

    WS Charts

    Bar graph tutorial

    or JpGraph, I'm not sure of the internals but there is free PHP5 and PHP4 versions available

    0 讨论(0)
  • 2021-01-03 11:46

    I don't believe that using Excel is the best way of generating a chart. Typically, with ASP.net, you would either write your own chart rendering, or you would use an external component to do this (liberal definition).

    My suggestions:

    1. Pipe the data into gnuplot, customize it and grab the output
    2. Get a third party widget to send the data into and handle the user interaction (Highly recommended)
    3. Write your own chartting control (free from licensing issues, but not worth the annoyances unless you really like doing graphics your self)
    0 讨论(0)
  • 2021-01-03 11:48

    Give Google Charts API a go.

    Aonther option you could look at is RRD tool, see here

    HTH

    0 讨论(0)
  • 2021-01-03 11:55

    Google Charts is a nice idea. I would use built-in PHP draw functions to generate a chart, though.

    0 讨论(0)
提交回复
热议问题