diff --git a/Classes/PHPExcel/Reader/Excel2003XML.php b/Classes/PHPExcel/Reader/Excel2003XML.php index dbb196d3..e8abeb4a 100644 --- a/Classes/PHPExcel/Reader/Excel2003XML.php +++ b/Classes/PHPExcel/Reader/Excel2003XML.php @@ -232,6 +232,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P { // Create new PHPExcel $objPHPExcel = new PHPExcel(); + $objPHPExcel->removeSheetByIndex(0); // Load into this instance return $this->loadIntoExisting($pFilename, $objPHPExcel); @@ -576,6 +577,7 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P $rowID = 1; if (isset($worksheet->Table->Row)) { + $additionalMergedCells = 0; foreach($worksheet->Table->Row as $rowData) { $rowHasData = false; $row_ss = $rowData->attributes($namespaces['ss']); @@ -599,11 +601,10 @@ class PHPExcel_Reader_Excel2003XML extends PHPExcel_Reader_Abstract implements P } } - $additionalMergedCells = 0; if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) { $columnTo = $columnID; if (isset($cell_ss['MergeAcross'])) { - $additionalMergedCells = (int)$cell_ss['MergeAcross']; + $additionalMergedCells += (int)$cell_ss['MergeAcross']; $columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1); } $rowTo = $rowID;