{"action":"created","issue":{"url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/1090","repository_url":"https://api.github.com/repos/PHPOffice/PHPExcel","labels_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/1090/labels{/name}","comments_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/1090/comments","events_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/1090/events","html_url":"https://github.com/PHPOffice/PHPExcel/issues/1090","id":196452533,"number":1090,"title":"Erroneous html generated with multiple worksheets and merged cells","user":{"login":"LorisZ","id":806943,"avatar_url":"https://avatars.githubusercontent.com/u/806943?v=3","gravatar_id":"","url":"https://api.github.com/users/LorisZ","html_url":"https://github.com/LorisZ","followers_url":"https://api.github.com/users/LorisZ/followers","following_url":"https://api.github.com/users/LorisZ/following{/other_user}","gists_url":"https://api.github.com/users/LorisZ/gists{/gist_id}","starred_url":"https://api.github.com/users/LorisZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorisZ/subscriptions","organizations_url":"https://api.github.com/users/LorisZ/orgs","repos_url":"https://api.github.com/users/LorisZ/repos","events_url":"https://api.github.com/users/LorisZ/events{/privacy}","received_events_url":"https://api.github.com/users/LorisZ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-19T16:10:42Z","updated_at":"2016-12-20T14:49:57Z","closed_at":null,"body":"When reading an Excelfile with 2 sheets and generating html with the function `generateSheetData`, the generated html is correct for the first sheet, but if there are merged cells in the second sheet, those cells remain unmerged in the resulting html.\r\n\r\nSimple steps to reproduce:\r\n1. Create Excelfile with 2 worksheets where both have 2+ cells merged to one.\r\n2. Read Excelfile with PHPExcel and generate HTML using the function `generateSheetData`\r\n\r\nResult: Merged cells remain unmerged in the second worksheet.\r\nExpected result: merged cells are merged with colspan/rowspan.\r\n\r\nTested with PHPExcel versions 1.7.8 and 1.8.1."},"comment":{"url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/comments/268261796","html_url":"https://github.com/PHPOffice/PHPExcel/issues/1090#issuecomment-268261796","issue_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/1090","id":268261796,"user":{"login":"LorisZ","id":806943,"avatar_url":"https://avatars.githubusercontent.com/u/806943?v=3","gravatar_id":"","url":"https://api.github.com/users/LorisZ","html_url":"https://github.com/LorisZ","followers_url":"https://api.github.com/users/LorisZ/followers","following_url":"https://api.github.com/users/LorisZ/following{/other_user}","gists_url":"https://api.github.com/users/LorisZ/gists{/gist_id}","starred_url":"https://api.github.com/users/LorisZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorisZ/subscriptions","organizations_url":"https://api.github.com/users/LorisZ/orgs","repos_url":"https://api.github.com/users/LorisZ/repos","events_url":"https://api.github.com/users/LorisZ/events{/privacy}","received_events_url":"https://api.github.com/users/LorisZ/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T14:49:57Z","updated_at":"2016-12-20T14:49:57Z","body":"Okay, here's what I got for PHPExcel 1.8.1:\r\n\r\n```php\r\n<?php\r\n\r\nrequire_once __DIR__ . '/PHPExcel/Classes/PhpExcel.php';\r\nrequire_once __DIR__ . '/PHPExcel/Classes/PHPExcel/IOFactory.php';\r\n\r\n$objPHPExcel = new PhpExcel();\r\n$filename = __DIR__ . \"/TwoWorksheetsWithMergedCells.xlsx\";\r\n$objReader = PHPExcel_IOFactory::createReaderForFile($filename);\r\n$objPHPExcel = $objReader->load($filename);\r\n\r\n$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML');\r\n\r\n/*// This commented block is a workaround\r\n$objWriter->setSheetIndex(null);\r\n$html = $objWriter->generateSheetData();*/\r\n\r\n$sheetHtml = [];\r\n$sheets = $objPHPExcel->getAllSheets();\r\nforeach ($sheets as $key => $sheet) {\r\n    $objWriter->setSheetIndex($key);\r\n    $sheetHtml[$key] = $objWriter->generateSheetData();\r\n    \r\n    echo \"<!--- start ----->\\n\";\r\n    echo $sheetHtml[$key];\r\n    echo \"<!--- end ----->\\n\";\r\n}\r\n```"}}
{"actor":{"display_login":"LorisZ"}}