Thank you for that. I made the changes as needed, but I am still getting the error that it can not find the class. Am I possibly doing the import wrong for the vendor? Or is it that I need to put a different path in there for the PEAR libraries?
On May 3, 9:32 am, brian <bally.z...@gmail.com> wrote: > You didn't provide the correct class name. Try it this way: > > 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 <howsoo...@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---