kartik-v / yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
http://demos.krajee.com/export
Other
165 stars 126 forks source link

The 'writer' setting for '\PhpOffice\PhpSpreadsheet\Spreadsheet' must be setup in 'exportConfig'. #362

Open ebs-av opened 2 years ago

ebs-av commented 2 years ago

composer update to v 1.4.2: code used: echo ExportMenu::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $gridColumns, 'filename' => 'Users Report Export '.date('d-M-Y'), 'exportConfig' => [ ExportMenu::FORMAT_HTML => [ 'label' => 'HTML', 'icon' => 'floppy-saved', 'iconOptions' => ['class' => 'text-info'], 'linkOptions' => [], 'options' => ['title' => 'Hyper Text Markup Language'], 'alertMsg' => 'The HTML export file will be generated for download.', 'mime' => 'text/html', 'extension' => 'html', 'writer' => ExportMenu::FORMAT_HTML ],

but i am getting the error of writer not set on the config

kartik-v commented 2 years ago

Need to check - cannot reproduce currently - can you try by not setting the key exportConfig['writer'] and let know if it works fine.

ebs-av commented 2 years ago

this error happened after the composer update to version 1.4.2... the code i had was without config at all and was giving that error.. i tried to set the config manually per type ... but still not working. IS THERE A WAY TO SET THE CONFIG NOT REQUIRED ???

japel commented 1 year ago

I am having the same problem with 1.4.2 @kartik-v any advice what could be done?