Moonlandsoft/yii2-phpexcel


(MOHD AZMIN BIN MOHD AZMI) #1

Hi, good morning.
I’m a new user for the Yii framework. I have a problem with Yii export library. I just follow the documentation in this link: https://github.com/moonlandsoft/yii2-phpexcel, output have come out like encoding views.

I show the output image for reference.

my code view:

<?=
 Excel::widget([
                            'models' => User::find()->where(['status'=>1])->all(),
                            'mode' => 'export', //default value as 'export'
                            'columns' => ['id','phone','email'], //without header working, because the header will be get label from attribute label. 
                            //'headers' => ['id' => 'Header Column 1','phone' => 'Header Column 2', 'email' => 'Header Column 3'], 
                        ]);
?>

view results:


(aida2432) #2

Hey! I have the same issue, have you solved it or do toy have an idea how to deal with this?


(Uldis Nelsons) #3

In response mihed HTML and Excel data