{"action":"created","issue":{"url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/982","repository_url":"https://api.github.com/repos/PHPOffice/PHPExcel","labels_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/982/labels{/name}","comments_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/982/comments","events_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/982/events","html_url":"https://github.com/PHPOffice/PHPExcel/issues/982","id":172488367,"number":982,"title":"Problem with usage of getCellByColumnAndRow inside cellIterator","user":{"login":"ajoah","id":10757301,"avatar_url":"https://avatars.githubusercontent.com/u/10757301?v=3","gravatar_id":"","url":"https://api.github.com/users/ajoah","html_url":"https://github.com/ajoah","followers_url":"https://api.github.com/users/ajoah/followers","following_url":"https://api.github.com/users/ajoah/following{/other_user}","gists_url":"https://api.github.com/users/ajoah/gists{/gist_id}","starred_url":"https://api.github.com/users/ajoah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajoah/subscriptions","organizations_url":"https://api.github.com/users/ajoah/orgs","repos_url":"https://api.github.com/users/ajoah/repos","events_url":"https://api.github.com/users/ajoah/events{/privacy}","received_events_url":"https://api.github.com/users/ajoah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-22T15:52:44Z","updated_at":"2016-08-22T17:09:54Z","closed_at":"2016-08-22T17:09:54Z","body":"Hi :)\r\n\r\nSince i have updated phpexcel from 1.7.7 to 1.8.1, the following code doesn't work anymore\r\n```php\r\n$objReader = new PHPExcel_Reader_Excel5( 'Excel5' );\r\n$objReader->setReadDataOnly( true );\r\n$objPHPExcel          = $objReader->load( $file );\r\n$objWorksheetIterator = $objPHPExcel->getWorksheetIterator();\r\nforeach ( $objWorksheetIterator as $objWorksheet ) {\r\n\t$rowIterator = $objWorksheet->getRowIterator();\r\n\tforeach ( $rowIterator as $row ) {\r\n\t\t$cellIterator = $row->getCellIterator();\r\n\t\tforeach ($cellIterator as $cell) {\r\n\t\t\t$colIndex = PHPExcel_Cell::columnIndexFromString($cell->getColumn());\r\n\t\t\tvar_dump( 'before:'.$cell->getCoordinate() );\r\n\t\t\t$myValue = $objWorksheet->getCellByColumnAndRow($colIndex-1,6)->getValue();\r\n\t\t\tvar_dump( 'after:'.$cell->getCoordinate() );\r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n}\r\n```\r\nOutput :\r\n1.7.7 :\r\n> before: A1\r\n> after: A1\r\n\r\n1.8.1\r\n> before: A1\r\n> after: A6\r\n\r\n(apparently $cell is overriden by the cell returned by `getCellByColumnAndRow`)\r\n\r\nAnd if the cell from `getCellByColumnAndRow` doesn't exist:\r\n1.7.7 :\r\n> before: A1\r\n> after: A1\r\n\r\n1.8.1\r\n> before: A1\r\n> Fatal error: Uncaught Error: Call to a member function getCurrentAddress() on null in [...]\\vendor\\phpoffice\\phpexcel\\Classes\\PHPExcel\\Cell.php on line 168\r\n\r\nThis is a bug or it is no longer possible to use `getCellByColumnAndRow` inside a CellIterator ?"},"comment":{"url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/comments/241481581","html_url":"https://github.com/PHPOffice/PHPExcel/issues/982#issuecomment-241481581","issue_url":"https://api.github.com/repos/PHPOffice/PHPExcel/issues/982","id":241481581,"user":{"login":"ajoah","id":10757301,"avatar_url":"https://avatars.githubusercontent.com/u/10757301?v=3","gravatar_id":"","url":"https://api.github.com/users/ajoah","html_url":"https://github.com/ajoah","followers_url":"https://api.github.com/users/ajoah/followers","following_url":"https://api.github.com/users/ajoah/following{/other_user}","gists_url":"https://api.github.com/users/ajoah/gists{/gist_id}","starred_url":"https://api.github.com/users/ajoah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajoah/subscriptions","organizations_url":"https://api.github.com/users/ajoah/orgs","repos_url":"https://api.github.com/users/ajoah/repos","events_url":"https://api.github.com/users/ajoah/events{/privacy}","received_events_url":"https://api.github.com/users/ajoah/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T17:09:54Z","updated_at":"2016-08-22T17:09:54Z","body":"Yes that's what I'll do. Thank you for taking the time to answer me :)"}}
{"actor":{"display_login":"ajoah"}}