{"action":"created","issue":{"url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/1802","repository_url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel","labels_url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/1802/labels{/name}","comments_url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/1802/comments","events_url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/1802/events","html_url":"https://github.com/Maatwebsite/Laravel-Excel/issues/1802","id":363049262,"node_id":"MDU6SXNzdWUzNjMwNDkyNjI=","number":1802,"title":"Merge cell doesn't work in 3.0 version","user":{"login":"kevinRR","id":16461178,"node_id":"MDQ6VXNlcjE2NDYxMTc4","avatar_url":"https://avatars3.githubusercontent.com/u/16461178?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinRR","html_url":"https://github.com/kevinRR","followers_url":"https://api.github.com/users/kevinRR/followers","following_url":"https://api.github.com/users/kevinRR/following{/other_user}","gists_url":"https://api.github.com/users/kevinRR/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinRR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinRR/subscriptions","organizations_url":"https://api.github.com/users/kevinRR/orgs","repos_url":"https://api.github.com/users/kevinRR/repos","events_url":"https://api.github.com/users/kevinRR/events{/privacy}","received_events_url":"https://api.github.com/users/kevinRR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-24T08:16:17Z","updated_at":"2018-09-26T09:58:09Z","closed_at":null,"author_association":"NONE","body":"\r\n\r\n### Versions\r\n\r\n<!-- Please be as exact and complete as possible when proving version numbers -->\r\n\r\n* PHP version: 7.2\r\n* Laravel version: 5.6\r\n* Package version: 3.0 \r\n\r\n### Description\r\n\r\n<!-- Describe the issue -->\r\n\r\n### Steps to Reproduce\r\n\r\npublic function machineryExport()\r\n    {\r\n\r\n        return Excel::download(new MachineryExport, 'machinery.csv');\r\n    }\r\n\r\nmy machineryexport look like\r\n\r\n```\r\nclass MachineryExport implements FromView\r\n{\r\n    /**\r\n     * @return \\Illuminate\\Support\\Collection\r\n     */\r\n    public function view(): View\r\n    {\r\n        return view('export.machinery', [\r\n            'equipments' => MachineryEquipment::get()\r\n        ])->mergeCells('A1:E1');\r\n    }\r\n}\r\n\r\n```\r\nI want to merge the cell A1 and A2 but i cant and colspan and row span also not worked\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/comments/424657531","html_url":"https://github.com/Maatwebsite/Laravel-Excel/issues/1802#issuecomment-424657531","issue_url":"https://api.github.com/repos/Maatwebsite/Laravel-Excel/issues/1802","id":424657531,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDY1NzUzMQ==","user":{"login":"patrickbrouwers","id":7728097,"node_id":"MDQ6VXNlcjc3MjgwOTc=","avatar_url":"https://avatars2.githubusercontent.com/u/7728097?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickbrouwers","html_url":"https://github.com/patrickbrouwers","followers_url":"https://api.github.com/users/patrickbrouwers/followers","following_url":"https://api.github.com/users/patrickbrouwers/following{/other_user}","gists_url":"https://api.github.com/users/patrickbrouwers/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickbrouwers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickbrouwers/subscriptions","organizations_url":"https://api.github.com/users/patrickbrouwers/orgs","repos_url":"https://api.github.com/users/patrickbrouwers/repos","events_url":"https://api.github.com/users/patrickbrouwers/events{/privacy}","received_events_url":"https://api.github.com/users/patrickbrouwers/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T09:58:09Z","updated_at":"2018-09-26T09:58:09Z","author_association":"MEMBER","body":"Hey @kevinRR, where did you find this syntax? 3.0 doesn't have a `mergeCells` method and Laravel's `view()` helper doesn't have it either.\r\n\r\nIn the current state of the package you'll have to follow the extending docs (https://laravel-excel.maatwebsite.nl/3.0/exports/extending.html#events) and use the native `->mergeCells('A1:E1')` method of PhpSpreadsheet. The `AfterSheet` event is what you're looking for.\r\n\r\n```\r\nAfterSheet::class => function(AfterSheet $event) {\r\n    $event->sheet->getDelegate()->mergeCells('A1:E1');\r\n },\r\n```"}}
{"actor":{"display_login":"patrickbrouwers"}}