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

WithMultipleSheets HTML writeAllSheets #1887

Closed
spout opened this issue Nov 10, 2018 · 4 comments
Closed

WithMultipleSheets HTML writeAllSheets #1887

spout opened this issue Nov 10, 2018 · 4 comments

Comments

@spout
Copy link

spout commented Nov 10, 2018

Prerequisites

Versions

  • PHP version: 7.1.22
  • Laravel version: 5.5
  • Package version: 3.1

Description

Hello,

I have used the WithMultipleSheets concern, but can't find a way using events to set $writer->writeAllSheets(); for HTML writer as explained here :
https://phpspreadsheet.readthedocs.io/en/develop/topics/reading-and-writing-to-file/#html

I've seen this related issue : #386

The only way I found is by hacking Maatwebsite\Excel\Writer in the write function :

if ($writer instanceof Html && $export instanceof WithMultipleSheets) {
    $writer->writeAllSheets();
}

Is there other way to achieve this ?
Regards

@patrickbrouwers
Copy link
Member

patrickbrouwers commented Nov 12, 2018

@spout you can access the Writer via an Event: https://laravel-excel.maatwebsite.nl/3.1/exports/extending.html

@patrickbrouwers
Copy link
Member

I'll see if I can change that

@patrickbrouwers
Copy link
Member

Next release will write all html sheets

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

No branches or pull requests

2 participants