diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 44a95774..810bdb4b 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -430,7 +430,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable { if (!is_null($this->_cellCollection)) { return $this->_cellCollection->getSortedCellList(); - } + } return array(); } diff --git a/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/Classes/PHPExcel/Writer/Excel5/Worksheet.php index 51a158bb..3532281e 100644 --- a/Classes/PHPExcel/Writer/Excel5/Worksheet.php +++ b/Classes/PHPExcel/Writer/Excel5/Worksheet.php @@ -248,8 +248,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter $this->_lastColumnIndex = -1; foreach ($this->_phpSheet->getCellCollection(false) as $cellID) { - preg_match('/^(\w+)(\d+)$/U',$cellID,$matches); - list(,$col,$row) = $matches; + list($col,$row) = sscanf($cellID,'%[A-Z]%d'); $column = PHPExcel_Cell::columnIndexFromString($col) - 1; // Don't break Excel!