moonlandsoft / yii2-phpexcel

Exporting PHP to Excel
MIT License
135 stars 89 forks source link

How to setup export file path in export method? #46

Open hassanuos opened 2 years ago

hassanuos commented 2 years ago

I try to fine attribute to export file to a specific location on the server but I could not. Is there any attribute available? below is my sample source code. I am trying to create an excel sheet using the console command.

`public function actionCreateList(){

    \moonland\phpexcel\Excel::export([
        'models' => Property::find()->all(),
        'setFirstRecordAsKeys' => true,
        'columns' => [
            [
                'header' => 'Title',
                'format' => 'text',
                'wraptext' => true,
                'value' => function($model) {
                    return $model->title;
                },
            ],
        ]
    ]);
}`