Can't change filename

Issue #2 new
Luqman Sungkar created an issue

I try to use something like :

ExcelView::widget([
            'dataProvider' => $dataProvider,
            'filterModel' => $searchModel,
            'fullExportType'=> 'xlsx', //can change to html,xls,csv and so on,
            'filename' => 'Data Registrasi',
            'grid_mode' => 'export',
            'columns' => [
                ['class' => 'yii\grid\SerialColumn'],
                .....
              ],
        ]);

but the file name still grid-export. I manage to get it work by editing the ExcelView.php and change line 150 (I only change the xslx) to :

 'filename' => Yii::t('excelview', $this->filename),

Is it a bug? or just me doing it wrong?

Comments (2)

  1. Log in to comment