Hi all, I am new to this site and hope that some one would be able to help me.
cutting to the chase, i need some way of generating an excel spreadsheet with a dynamic graph from data recieved from a database.
I have been asked to research this.
any one with some advice?
php to excel chart?
Moderator: General Moderators
-
Marchosius2
- Forum Newbie
- Posts: 3
- Joined: Wed Sep 15, 2010 7:23 am
Re: php to excel chart?
thanx for the reply, through much searching i found a way but not a method.
i have a excel macro that would generate my chart and place my data in. but the method i dont have is to excecute the macro into excel useing php.
any help on this?
i have a excel macro that would generate my chart and place my data in. but the method i dont have is to excecute the macro into excel useing php.
any help on this?
-
Marchosius2
- Forum Newbie
- Posts: 3
- Joined: Wed Sep 15, 2010 7:23 am
Re: php to excel chart?
Can any one help on this? most of the methods online show how to genirate a image file and place that in excel.
I am looking for a method to send the data to excel and make excel genirate the chart and then let the user download that excel doc.
I know how to write data to excel, and make it download to the user. but how can you make excel genirate the chart?
some methods i have thought of would be to send the macros through php to the excel.
or
make a excel file with the chart already in it and then just update the "template" file?
I am looking for a method to send the data to excel and make excel genirate the chart and then let the user download that excel doc.
I know how to write data to excel, and make it download to the user. but how can you make excel genirate the chart?
some methods i have thought of would be to send the macros through php to the excel.
or
make a excel file with the chart already in it and then just update the "template" file?
Re: php to excel chart?
you are tying to get tomatoes to work with apples. you cant use a scripting language like PHP to control a GUI like excel. the best you could do is use command lines to accomplish your needs... unfortunately excel only has command options (control how it loads and what file to load). You may be able to get something working with the Excel Automation Client. but I have never used it, only know of its existence.
The real question here is why excel and why does the chart need to be generated with a macro? and why excel?
There are TONS of ways to create charts with PHP and even ways of creating excel files with charts. but in terms of using PHP to send data to excel and excel creating a chart, saving the file, and then telling PHP that its ready for download.... I believe you're SOL.
The real question here is why excel and why does the chart need to be generated with a macro? and why excel?
There are TONS of ways to create charts with PHP and even ways of creating excel files with charts. but in terms of using PHP to send data to excel and excel creating a chart, saving the file, and then telling PHP that its ready for download.... I believe you're SOL.
Re: php to excel chart?
If it's a Windows server you may try using the Excel COM API ...
http://www.php.net/manual/en/class.com.php
though I've never tried it.
http://www.php.net/manual/en/class.com.php
though I've never tried it.
There are 10 types of people in this world, those who understand binary and those who don't
Re: php to excel chart?
http://phpexcel.codeplex.com/
This can be found by the way, by googling "php excel"
This can be found by the way, by googling "php excel"