App::import('vendor', 'Spreadsheet_Excel_Writer', array('file' => 'vendors/PEAR/
Spreadsheet_Excel_Writer-0.9.1/Writer/Writer.php'));
On Sun, May 3, 2009 at 12:17 PM, shird <howsoon99@gmail.com> wrote:
>
> I am trying to get the Spreadsheet_Excel_Writer to work as a vendor in
> CakePHP 1.2. I have downloaded the PEAR library and the
> Spreadsheet_Excel_Writer libraries to the following:
>
> app/vendors/PEAR/PEAR
> app/vendors/PEAR/Spreadsheet_Excel_Writer-0.9.1
>
> I am trying to export a list of registrations that is stored in a
> MySQL database. In my controller, I am trying to load the vendor
> libraries with the following:
> App::import('vendor', 'xls', array('file' => 'vendors/PEAR/
> Spreadsheet_Excel_Writer-0.9.1/Writer/Writer.php'));
>
> I am trying to do everything from the controller and not the view, as
> I want this to be a "view-less" action.
>
> The code I am trying to load is as follows:
> $xls = new Spreadsheet_Excel_Writer("registrations.xls");
>
> and it fails and gives this error message:
> Fatal error: Class 'Spreadsheet_Excel_Writer' not found in ~app/
> controllers/conferences_controller.php on line 827
>
> I have looked thru this group to see if there is any info or
> instructions on how to include PEAR libraries with a CakePHP 1.2 app,
> and I have looked thru the cookbook and there is no section for
> vendors, and I have done Google searches for the info on how to do
> this.
>
> If anyone can steer me in the right direction, or to a site that has
> the information on how to get a PEAR library to work with CakePHP 1.2,
> it would be very helpful.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment