Set correct active sheet when setReadDataOnly(true) and only loading a selection of two or more worksheets rather than all worksheets

This commit is contained in:
Mark Baker 2013-01-21 12:56:21 +00:00
parent 092fc7b5f7
commit 9de3d5a62b

View File

@ -1643,7 +1643,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
}
}
if (!$this->_readDataOnly) {
if ((!$this->_readDataOnly) || (!empty($this->_loadSheetsOnly))) {
// active sheet index
$activeTab = intval($xmlWorkbook->bookViews->workbookView["activeTab"]); // refers to old sheet index