Using PHPExcel in Symfony

Feb 13, 2009 at 9:21 AM
Hi,

I am new to symfony. I downloaded the Plugin\

symfony plugin-install http://plugins.symfony-project.com/sfPhpExcelPlugin

But when I execute the
php plugins/sfPhpExcelPlugin/examples/01simple.php

I get the following error

C:\Program Files\xampp\htdocs\wbrt>php plugins/sfPhpExcelPlugin/examples/01simpl
e.php
09:20:58 Create new PHPExcel object

Fatal error: Class 'sfPhpExcel' not found in C:\Program Files\xampp\htdocs\wbrt\
plugins\sfPhpExcelPlugin\examples\01simple.php on line 33.


I have read that we have to store the class files in lib directories and do symfony cc for class autoloading

http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files

Please help me in this regard.

Regards

Deepak Bhatia

Feb 13, 2009 at 11:44 AM
Hi,

This problem is solved but

$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));

The above lines are throwing the exception.

Regards

Deepak Bhatia
Developer
Feb 14, 2009 at 1:56 AM
Can you paste what you get for the exception?

Feb 14, 2009 at 10:14 AM
Hi,
Thanks for your reply.
My PHP Application runs on linux and I am getting the excel file creation exception probably because of write permissions on linux from PHP Code.
The same PHP code works on the Windows machine and I am getting the excel file.
Regards
Deepak Bhatia

On 13 Feb 2009 17:56:29 -0800, koyama <notifications@codeplex.com> wrote:

From: koyama

Can you paste what you get for the exception?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Feb 16, 2009 at 5:45 AM
Hi Mr. Koyama,
Kindly find the error message in the attached.
Regards
Deepak Bhatia

On Sat, Feb 14, 2009 at 7:26 AM, koyama <notifications@codeplex.com> wrote:

From: koyama

Can you paste what you get for the exception?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 14, 2009 at 12:31 PM

Hi,

I  downloaded the  plugin.But I got the following error message.

This is path:

 $path = '/plugins/Classes/PHPExcel/';
 set_include_path(get_include_path() . PATH_SEPARATOR . $path);

Fatal error: Class 'sfPhpExcel' not found in /home/padmagc/sfprojects2/timsCore/apps/backend/modules/rpttrekkerdistribution/actions/actions.class.php on line 178

 

What and where should I need to change?

I donot have an idea how to implement in  symfony .

Please let me know

 

Kind Regards

Padma



May 14, 2009 at 12:35 PM
Did you do php symfony cc in your project directory ?

On Thu, May 14, 2009 at 5:01 PM, [email removed] wrote:
> From: padma
>
> Hi,
>
> I  downloaded the  plugin.But I got the following error message.
>
> This is path:
>
>  $path = '/plugins/Classes/PHPExcel/';
>  set_include_path(get_include_path() . PATH_SEPARATOR . $path);
>
> Fatal error: Class 'sfPhpExcel' not found in
> /home/padmagc/sfprojects2/timsCore/apps/backend/modules/rpttrekkerdistribution/actions/actions.class.php
> on line 178
>
>
>
> What and where should I need to change?
>
> I donot have an idea how to implement in  symfony .
>
> Please let me know
>
>
>
> Kind Regards
>
> Padma
>
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Feb 9, 2010 at 6:53 PM

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Feb 10, 2010 at 9:00 AM
Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Feb 10, 2010 at 1:31 PM
Symfony 1.4 !!!

On Wed, Feb 10, 2010 at 4:01 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM
Feb 10, 2010 at 2:08 PM
Did you put this in plugins directory ?

On Wed, Feb 10, 2010 at 7:01 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Symfony 1.4 !!!

On Wed, Feb 10, 2010 at 4:01 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Feb 10, 2010 at 5:16 PM
Yes it's working now, I need to enable the plugin at ProjectConfiguration.class.php file otherwise it don't works

On Wed, Feb 10, 2010 at 9:09 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Did you put this in plugins directory ?

On Wed, Feb 10, 2010 at 7:01 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Symfony 1.4 !!!

On Wed, Feb 10, 2010 at 4:01 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM
Feb 10, 2010 at 5:32 PM
Thanks for the update, can you please send the ProjectConfiguration.class.php code change.
 
Deepak

On Wed, Feb 10, 2010 at 10:46 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Yes it's working now, I need to enable the plugin at ProjectConfiguration.class.php file otherwise it don't works


On Wed, Feb 10, 2010 at 9:09 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Did you put this in plugins directory ?

On Wed, Feb 10, 2010 at 7:01 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Symfony 1.4 !!!

On Wed, Feb 10, 2010 at 4:01 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Feb 10, 2010 at 5:42 PM
Just enable the plugin
 
class ProjectConfiguration extends sfProjectConfiguration {
  public function setup() {
    $this->enablePlugins(array(
            'sfDoctrinePlugin',
            'sfDoctrineGuardPlugin',
            'sfPhpExcelPlugin'
    ));
  }
}

Cheers and glad to help
 
Anyway, I have another question: How I save the generated files to /web/uploads dir? By default the library save the files to actions/ folder wich seem bad to me.
 
On Wed, Feb 10, 2010 at 12:33 PM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Thanks for the update, can you please send the ProjectConfiguration.class.php code change.
 
Deepak

On Wed, Feb 10, 2010 at 10:46 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Yes it's working now, I need to enable the plugin at ProjectConfiguration.class.php file otherwise it don't works


On Wed, Feb 10, 2010 at 9:09 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Did you put this in plugins directory ?

On Wed, Feb 10, 2010 at 7:01 PM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Symfony 1.4 !!!

On Wed, Feb 10, 2010 at 4:01 AM, toreachdeepak <notifications@codeplex.com> wrote:

From: toreachdeepak

Are you using Symfony 1.3/1.4 ?

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
ReynierPM
May 17, 2010 at 9:55 AM
Hi,
 
Where should I put sfPHPExcelPlugin in the symfony tree ?
 
Thanks
 
Deepak

On Wed, Feb 10, 2010 at 12:23 AM, reynierpm <notifications@codeplex.com> wrote:

From: reynierpm

Hi:

I'm having the same error while trying to create a Excel 2003 file. Take a look at my code:

public function executeExcel2003creator(sfWebRequest $request) {
    $excel = new sfPhpExcel();
    $excel->getProperties()->setCreator('AfilReg');
    $excel->getProperties()->setTitle($this->getResponse()->getTitle());
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
    $excel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);
    $excel->setActiveSheetIndex(0);
    $excel->getActiveSheet()->setCellValue('A1','No. Identidad');
    $excel->getActiveSheet()->setCellValue('B1','Sexo');
    $excel->getActiveSheet()->setCellValue('C1','Fecha de Ingreso');
    $excel->getActiveSheet()->setCellValue('D1','Empresa');
    $excel->getActiveSheet()->setCellValue('E1','Título');

$excel->getActiveSheet()->setTitle($this->getResponse()->getTitle());
    
    $excel->setActiveSheetIndex(0);
    // Save Excel 2007 file
    $objWriter = PHPExcel_IOFactory::createWriter($excel, 'Excel2003');
    $objWriter->save(str_replace('.php', '.xls', __FILE__));
  }

The error is the same:

Fatal error: Class 'sfPhpExcel' not found in D:\WebServer\varwww\dev\afilreg\apps\frontend\modules\reportes\actions\actions.class.php on line 42

And yes, I cleanup the cache (symfony cc), can any help me?

Read the full discussion online.

To add a post to this discussion, reply to this email (PHPExcel@discussions.codeplex.com)

To start a new discussion for this project, email PHPExcel@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com