If you're running PHP on an IIS server, you might be able to use COM objects to do what you're trying to do; but that's still not all that easy. http://us.php.net/manual/en/ref.com.php
There are PHP libraries out there to help you create XLS files using PHP. You could use CakePHP to help you retrieve the specific information you want, and in using whatever external PHP Excel library (such as PHPExcel - http://www.codeplex.com/PHPExcel ... or php-excel - http://code.google.com/p/php-excel/) as a Vendor within Cake along with Cake itself to output your XLS file(s). That being said, I've never worked on creating such a task, but there are definitely ways to do it (albeit, not necessarily exactly the way you'd want to do it). On Dec 8, 10:07 pm, liaogz82 <[EMAIL PROTECTED]> wrote: > Ok i thought of another alternative > > What about I have an excel template that is pre-made, and i just want > cakePHP to write values to the selected cells. Once the selected cells > is being populated, the excel will use the numbers to draw up the > relevant chart? > > On Nov 28, 3:45 am, James K <[EMAIL PROTECTED]> wrote: > > > > > Yes, it's definitely possible. But it's also definitely not easy. > > > Excel 2007's .xlsx format is simply a zip file containing a whole > > bunch of XML files. You could write code that produce those xml files, > > zips it up, call it xlsx and delivers it to the user. > > > A shortcut I commonly use is to produce an HTML table, and send that > > to the client as an xls file (The RequestHandler in Cake makes it easy > > to spoof your resultant view as a downloadable file). Excel is smart > > enough to recognize an HTML table as tabular data and display it as > > such. Excel 2007 will complain, but it will still handle it correctly. > > > You won't get any pie charts that way, though. > > > Anything else is going to likely cost you. Business intelligence and > > reporting tools that can generate the kind of reports you're looking > > for are generally very expensive (several thousand dollars), and are > > difficult to integrate into an application. > > > Good luck, > > James > > > On Nov 26, 1:54 am,liaogz82<[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am looking into ways to use cakePHP to query into MySQL database to > > > extract out the relevant data, then export out a report in MS excel > > > that will include several pie charts. Such reports are to review by > > > user on the browser first before it is being exported. Is there anyway > > > to do it?- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
