Answer the question
In order to leave comments, you need to log in
Yii export to excel from sql query?
I am using yiiheart which uses phpexel.
it correctly unloads the data received from cgridview (with filters). But the grid also displays data from other tables. How can I transfer my data set to pxexel?
in controller
public function actionExport()
{
$model=new FeS;
$model->unsetAttributes(); // clear any default values
if(isset($_POST['FeS']))
$model->attributes=$_POST['FeS'];
$exportType = $_POST['fileType'];
$this->widget('ext.heart.export.EHeartExport', array(
'title'=>'List of FeS',
'dataProvider' => $model->search(),
'filter'=>$model,
'grid_mode'=>'export',
'exportType'=>$exportType,
'columns' => array(
'id',
'fe',
's',
),
));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question