Hi Everybody,
I have been trying to export CGridView data to excel or csv file and save the file. So, I used the the extension EExcelView. As their instruction I extracted PHPExcel and EExcelView into extensions folder as ptrotected/PHPExcel and ptrotected/EExcelView and I wrote the following code into admin.php file as:
$this->widget('application.extensions.EExcelView', array(
'dataProvider'=>$model->search(),
'autoWidth'=>true,
'exportType'=>'CSV',
'grid_mode' => 'export',
'filter'=>$model,
'filename'=>'newFile',
'columns'=>array(
'id',
'name',
'email',
'username',
'password',
'last_login_time',
'create_time',
'update_time',
array(
'class'=>'CButtonColumn',
),
),
));
Unfortunately, I do not get any file to save rather I get that all the data are shown on browser. I applied several variation in option reading their instruction. But no luck. I spent 3 days but no luck. Please help me someone.
Kind regards,
Shimul