From 9de3d5a62bd28e6d2b0820d6b1af16d2f0a7f277 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Mon, 21 Jan 2013 12:56:21 +0000 Subject: [PATCH] Set correct active sheet when setReadDataOnly(true) and only loading a selection of two or more worksheets rather than all worksheets --- Classes/PHPExcel/Reader/Excel2007.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index a9c26fe..1b3a67e 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -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