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

Cannot download file #44

Open
ilbassa opened this issue Oct 7, 2020 · 3 comments
Open

Cannot download file #44

ilbassa opened this issue Oct 7, 2020 · 3 comments

Comments

@ilbassa
Copy link

ilbassa commented Oct 7, 2020

I cannot download the file excel as attachment from thw browser.

The code is
`
$model = PreferenzeFoto::find()->one();

        return \moonland\phpexcel\Excel::export([
            'models' => $model,
            'mode' => 'export', //default value as 'export'
            'columns' => ['FOTOGRAFIA_ID'],
            'headers' => ['FOTOGRAFIA_ID'=>'asd'],
        ]);

`
and the result is
Immagine 2020-10-07 112644

How I can download the file??

@ilbassa ilbassa changed the title Cannot dowload file Cannot download file Oct 7, 2020
@mops1936
Copy link

mops1936 commented Sep 3, 2021

@ilbassa Have you solved the problem?

@ilbassa
Copy link
Author

ilbassa commented Sep 6, 2021

No, we have used another extension for download the excel.

@desaikalpesh34
Copy link

           \moonland\phpexcel\Excel::widget([
               'fileName' => 'customerData',
               'asAttachment' => true,
               
               'models' => $customers,
               'mode' => 'export', //default value as 'export'
               'columns' => ['customerid','name','email'], 
               'headers' => ['column1' => 'customerid','column2' => 'name', 'column3' => 'email'], 
           ]);

You can pass fileName and asAttachment two additional parameter and its works fine!

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