ASK PHPExcel only metadata

hai guys i want to ask.

I want to create report to excel use phpexcel

i try from bega and http://www.yiiframework.com/extension/phpexcel

but just only show meta data.


public function actionExcel()

        {       


                $model=new Kelurahan('search');

                                

                if(isset($_GET['yt0']))

                {

                        $dataProvider= $model->search();

                        $dataProvider->pagination= false; // for retrive all modules

            $data = $dataProvider->data;

            foreach ($data as $model)

            {

                $test = array($model);

            }

			Yii::import('application.extensions.phpexcel.JPhpExcel');


                        $xls = new JPhpExcel('UTF-8', false, 'test');

                        $xls->addArray($test);

                        $xls->generateXML('my-test');


                }

                

                $this->render('excel',array(

                        'model'=>$model,

                ));

        }

in page view admin.php


<?php


<?php $this->widget('zii.widgets.grid.CGridView', array(

	'id'=>'kelas-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'columns'=>array(

               array(

                    'header' => 'No',

            'value'=>'$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize+$row+1'

                ),

		'nama',


		array(

			'class'=>'CButtonColumn',

			'template'=>'{update}{delete}',


		),

	),

)); ?>

SS like this

::) ::)

when my application also do in the same but i cant get it,please help me,i cant get any errors,bt how will see the output

my problem is the same…

it’s funny, a few minute earlier i can download the excell fine.

have you find the solution guys??

Need ut help please bout Excell from YII

Hi tieulonglanh.

I have read you post about a new way to use PHPExcell.

but i have this problem, after i do as you wrote in the manual. when i tried to run the web,

there is an error as below :

Alias "application.extensions.PHPExcel" is invalid. Make sure it points to an existing PHP file.

it’s like that yii wont recognize my setting in the config/main.php :

‘components’=>array(

	'user'=&gt;array(


		// enable cookie-based authentication


		'allowAutoLogin'=&gt;true,


	),


	//Addition


		 'excel'=&gt;array(


          'class'=&gt;'application.extensions.PHPExcel',


        ),

in the controller i have wrote it down like this:

//Save to abc.xlsx file

    // You can use like PHPExcel documentation from codeplex: 


    //&#036;objWriter = new PHPExcel_Writer_Excel2007(&#036;objPHPExcel);


    //&#036;objWriter-&gt;save(&#036;filename);


    &#036;objPHPExcel-&gt;saveExcel2007(&#036;objPHPExcel,&#036;filename);

can you please correct me if there something missing?

or the file that I have downloaded to be put in the application/extensions is not completed?

thank you for your kind response.