Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ebs-av opened this issue Jun 15, 2022 · 3 comments

Comments

@ebs-av
Copy link

ebs-av commented Jun 15, 2022

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 kartik-v reopened this Jun 16, 2022
@kartik-v
Copy link
Owner

kartik-v commented Jun 16, 2022

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
Copy link
Author

ebs-av commented Jun 17, 2022

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
Copy link

japel commented Aug 22, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants