Hi
I want to export to excel the below table which is displayed in the webpage.
Admin View:
<?php $this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'loan-record-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'demo_loan_ref',
'country',
'company',
'requester_name',
'requester_email',
'loandate',
'exp_returndate',
array(
'header'=>'Status',
'type'=>'raw',
'value'=>'LoanRecord::getStatus($data->approve)',
),
array(
'header'=>'Action',
'class'=>'CButtonColumn',
'template'=>'{View Detail}<br/>{Complete Draft}<br/>{View Form}',
'buttons'=>array(
'View Detail'=>array(
'label'=>'View Detail',
'url'=>'CController::createUrl("/LoanRecord/view", array("id"=>$data->id))',
'visible'=>'$data->approve != 0',
),
'Complete Draft'=>array(
'label'=>'Complete Draft',
'url'=>'CController::createUrl("/LoanItem/create", array("id"=>$data->id))',
'visible'=>'$data->approve == 0',
),
'View Form'=>array(
'label'=>'View Form',
'url'=>'CController::createUrl("/loanRecord/formApprove", array("id"=>$data->id))',
'visible'=>'$data->approve == 3',
)
)
),
),
)); ?>
Please help me on this.
How the values in CGrid View can be exported to excel?