Changes to folder structures to bring PHPExcel in line with other PHPOffice projects

Additional namespacing work on PHPExcel core
This commit is contained in:
MarkBaker 2015-05-26 21:21:05 +01:00
parent 538fe93105
commit 85118eb030
254 changed files with 70 additions and 221 deletions

View File

@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
/** Include PHPExcel */ /** Include PHPExcel */
require_once dirname(__FILE__) . '/../classes/Bootstrap.php'; require_once dirname(__FILE__) . '/../src/Bootstrap.php';
// Create new PHPExcel object // Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL; echo date('H:i:s') , " Create new PHPExcel object" , EOL;
$objPHPExcel = new PHPExcel\Spreadsheet(); $objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties // Set document properties
echo date('H:i:s') , " Set document properties" , EOL; echo date('H:i:s') , " Set document properties" , EOL;
@ -92,7 +92,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL; echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true); $callStartTime = microtime(true);
$objWriter = PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true); $callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime; $callTime = $callEndTime - $callStartTime;
@ -107,7 +107,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel5 format" , EOL; echo date('H:i:s') , " Write to Excel5 format" , EOL;
$callStartTime = microtime(true); $callStartTime = microtime(true);
$objWriter = PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace('.php', '.xls', __FILE__)); $objWriter->save(str_replace('.php', '.xls', __FILE__));
$callEndTime = microtime(true); $callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime; $callTime = $callEndTime - $callStartTime;

View File

@ -34,12 +34,12 @@ date_default_timezone_set('Europe/London');
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
/** Include PHPExcel */ /** Include PHPExcel */
require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; require_once dirname(__FILE__) . '/../classes/Bootstrap.php';
// Create new PHPExcel object // Create new PHPExcel object
echo date('H:i:s') , " Create new PHPExcel object" , EOL; echo date('H:i:s') , " Create new PHPExcel object" , EOL;
$objPHPExcel = new PHPExcel(); $objPHPExcel = new \PHPExcel\Spreadsheet();
// Set document properties // Set document properties
echo date('H:i:s') , " Set document properties" , EOL; echo date('H:i:s') , " Set document properties" , EOL;
@ -149,7 +149,7 @@ $objPHPExcel->setActiveSheetIndex(0);
echo date('H:i:s') , " Write to Excel2007 format" , EOL; echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true); $callStartTime = microtime(true);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true); $callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime; $callTime = $callEndTime - $callStartTime;
@ -163,7 +163,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Reload workbook from saved file" , EOL; echo date('H:i:s') , " Reload workbook from saved file" , EOL;
$callStartTime = microtime(true); $callStartTime = microtime(true);
$objPHPExcel = PHPExcel_IOFactory::load(str_replace('.php', '.xlsx', __FILE__)); $objPHPExcel = \PHPExcel\IOFactory::load(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true); $callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime; $callTime = $callEndTime - $callStartTime;

View File

@ -1,150 +0,0 @@
<?php
namespace PHPExcel\Calculation;
/**
* PHPExcel_Calculation_Function
*
* Copyright (c) 2006 - 2015 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @category PHPExcel
* @package PHPExcel_Calculation
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
*/
class Function
{
/* Function categories */
const CATEGORY_CUBE = 'Cube';
const CATEGORY_DATABASE = 'Database';
const CATEGORY_DATE_AND_TIME = 'Date and Time';
const CATEGORY_ENGINEERING = 'Engineering';
const CATEGORY_FINANCIAL = 'Financial';
const CATEGORY_INFORMATION = 'Information';
const CATEGORY_LOGICAL = 'Logical';
const CATEGORY_LOOKUP_AND_REFERENCE = 'Lookup and Reference';
const CATEGORY_MATH_AND_TRIG = 'Math and Trig';
const CATEGORY_STATISTICAL = 'Statistical';
const CATEGORY_TEXT_AND_DATA = 'Text and Data';
/**
* Category (represented by CATEGORY_*)
*
* @var string
*/
private $category;
/**
* Excel name
*
* @var string
*/
private $excelName;
/**
* PHPExcel name
*
* @var string
*/
private $phpExcelName;
/**
* Create a new PHPExcel_Calculation_Function
*
* @param string $pCategory Category (represented by CATEGORY_*)
* @param string $pExcelName Excel function name
* @param string $pPHPExcelName PHPExcel function mapping
* @throws PHPExcel_Calculation_Exception
*/
public function __construct($pCategory = null, $pExcelName = null, $pPHPExcelName = null)
{
if (($pCategory !== null) && ($pExcelName !== null) && ($pPHPExcelName !== null)) {
// Initialise values
$this->category = $pCategory;
$this->excelName = $pExcelName;
$this->phpExcelName = $pPHPExcelName;
} else {
throw new PHPExcel_Calculation_Exception("Invalid parameters passed.");
}
}
/**
* Get Category (represented by CATEGORY_*)
*
* @return string
*/
public function getCategory()
{
return $this->category;
}
/**
* Set Category (represented by CATEGORY_*)
*
* @param string $value
* @throws PHPExcel_Calculation_Exception
*/
public function setCategory($value = null)
{
if (!is_null($value)) {
$this->category = $value;
} else {
throw new PHPExcel_Calculation_Exception("Invalid parameter passed.");
}
}
/**
* Get Excel name
*
* @return string
*/
public function getExcelName()
{
return $this->excelName;
}
/**
* Set Excel name
*
* @param string $value
*/
public function setExcelName($value)
{
$this->excelName = $value;
}
/**
* Get PHPExcel name
*
* @return string
*/
public function getPHPExcelName()
{
return $this->phpExcelName;
}
/**
* Set PHPExcel name
*
* @param string $value
*/
public function setPHPExcelName($value)
{
$this->phpExcelName = $value;
}
}

View File

@ -58,7 +58,7 @@ class Autoloader
} }
$classFilePath = __DIR__ . DIRECTORY_SEPARATOR . $classFilePath = __DIR__ . DIRECTORY_SEPARATOR .
'src' . DIRECTORY_SEPARATOR . 'PhpSpreadsheet' . DIRECTORY_SEPARATOR .
str_replace(['PHPExcel\\', '\\'], ['', '/'], $className) . str_replace(['PHPExcel\\', '\\'], ['', '/'], $className) .
'.php'; '.php';

View File

@ -2116,7 +2116,7 @@ class Calculation
} }
if (!isset(self::$instance) || (self::$instance === null)) { if (!isset(self::$instance) || (self::$instance === null)) {
self::$instance = new PHPExcel_Calculation(); self::$instance = new \PHPExcel\Calculation();
} }
return self::$instance; return self::$instance;

View File

@ -1,5 +1,7 @@
<?php <?php
namespace PHPExcel\Calculation\Token;
/** /**
* PHPExcel_Calculation_Token_Stack * PHPExcel_Calculation_Token_Stack
* *
@ -25,7 +27,7 @@
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Calculation_Token_Stack class Stack
{ {
/** /**
* The parser stack for formulae * The parser stack for formulae

View File

@ -40,26 +40,26 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
{ {
// sanitize UTF-8 strings // sanitize UTF-8 strings
if (is_string($value)) { if (is_string($value)) {
$value = PHPExcel_Shared_String::SanitizeUTF8($value); $value = \PHPExcel\Shared\String::SanitizeUTF8($value);
} }
// Find out data type // Find out data type
$dataType = parent::dataTypeForValue($value); $dataType = parent::dataTypeForValue($value);
// Style logic - strings // Style logic - strings
if ($dataType === PHPExcel_Cell_DataType::TYPE_STRING && !$value instanceof PHPExcel_RichText) { if ($dataType === DataType::TYPE_STRING && !$value instanceof PHPExcel_RichText) {
// Test for booleans using locale-setting // Test for booleans using locale-setting
if ($value == PHPExcel_Calculation::getTRUE()) { if ($value == \PHPExcel\Calculation::getTRUE()) {
$cell->setValueExplicit(true, PHPExcel_Cell_DataType::TYPE_BOOL); $cell->setValueExplicit(true, DataType::TYPE_BOOL);
return true; return true;
} elseif ($value == PHPExcel_Calculation::getFALSE()) { } elseif ($value == \PHPExcel\Calculation::getFALSE()) {
$cell->setValueExplicit(false, PHPExcel_Cell_DataType::TYPE_BOOL); $cell->setValueExplicit(false, DataType::TYPE_BOOL);
return true; return true;
} }
// Check for number in scientific format // Check for number in scientific format
if (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) { if (preg_match('/^'.\PHPExcel\Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) {
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);
return true; return true;
} }
@ -70,7 +70,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
if ($matches[1] == '-') { if ($matches[1] == '-') {
$value = 0 - $value; $value = 0 - $value;
} }
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode('??/??'); ->getNumberFormat()->setFormatCode('??/??');
@ -81,7 +81,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
if ($matches[1] == '-') { if ($matches[1] == '-') {
$value = 0 - $value; $value = 0 - $value;
} }
$cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode('# ??/??'); ->getNumberFormat()->setFormatCode('# ??/??');
@ -92,34 +92,34 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
if (preg_match('/^\-?[0-9]*\.?[0-9]*\s?\%$/', $value)) { if (preg_match('/^\-?[0-9]*\.?[0-9]*\s?\%$/', $value)) {
// Convert value to number // Convert value to number
$value = (float) str_replace('%', '', $value) / 100; $value = (float) str_replace('%', '', $value) / 100;
$cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00); ->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_PERCENTAGE_00);
return true; return true;
} }
// Check for currency // Check for currency
$currencyCode = PHPExcel_Shared_String::getCurrencyCode(); $currencyCode = \PHPExcel\Shared\String::getCurrencyCode();
$decimalSeparator = PHPExcel_Shared_String::getDecimalSeparator(); $decimalSeparator = \PHPExcel\Shared\String::getDecimalSeparator();
$thousandsSeparator = PHPExcel_Shared_String::getThousandsSeparator(); $thousandsSeparator = \PHPExcel\Shared\String::getThousandsSeparator();
if (preg_match('/^'.preg_quote($currencyCode).' *(\d{1,3}('.preg_quote($thousandsSeparator).'\d{3})*|(\d+))('.preg_quote($decimalSeparator).'\d{2})?$/', $value)) { if (preg_match('/^'.preg_quote($currencyCode).' *(\d{1,3}('.preg_quote($thousandsSeparator).'\d{3})*|(\d+))('.preg_quote($decimalSeparator).'\d{2})?$/', $value)) {
// Convert value to number // Convert value to number
$value = (float) trim(str_replace(array($currencyCode, $thousandsSeparator, $decimalSeparator), array('', '', '.'), $value)); $value = (float) trim(str_replace(array($currencyCode, $thousandsSeparator, $decimalSeparator), array('', '', '.'), $value));
$cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode( ->getNumberFormat()->setFormatCode(
str_replace('$', $currencyCode, PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE) str_replace('$', $currencyCode, \PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_USD_SIMPLE)
); );
return true; return true;
} elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) { } elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) {
// Convert value to number // Convert value to number
$value = (float) trim(str_replace(array('$',','), '', $value)); $value = (float) trim(str_replace(array('$',','), '', $value));
$cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); ->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
return true; return true;
} }
@ -128,10 +128,10 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
// Convert value to number // Convert value to number
list($h, $m) = explode(':', $value); list($h, $m) = explode(':', $value);
$days = $h / 24 + $m / 1440; $days = $h / 24 + $m / 1440;
$cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3); ->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME3);
return true; return true;
} }
@ -141,17 +141,17 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
list($h, $m, $s) = explode(':', $value); list($h, $m, $s) = explode(':', $value);
$days = $h / 24 + $m / 1440 + $s / 86400; $days = $h / 24 + $m / 1440 + $s / 86400;
// Convert value to number // Convert value to number
$cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4); ->getNumberFormat()->setFormatCode(\PHPExcel\Style\NumberFormat::FORMAT_DATE_TIME4);
return true; return true;
} }
// Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10' // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10'
if (($d = PHPExcel_Shared_Date::stringToExcel($value)) !== false) { if (($d = PHPExcel_Shared_Date::stringToExcel($value)) !== false) {
// Convert value to number // Convert value to number
$cell->setValueExplicit($d, PHPExcel_Cell_DataType::TYPE_NUMERIC); $cell->setValueExplicit($d, DataType::TYPE_NUMERIC);
// Determine style. Either there is a time part or not. Look for ':' // Determine style. Either there is a time part or not. Look for ':'
if (strpos($value, ':') !== false) { if (strpos($value, ':') !== false) {
$formatCode = 'yyyy-mm-dd h:mm'; $formatCode = 'yyyy-mm-dd h:mm';
@ -166,7 +166,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder
// Check for newline character "\n" // Check for newline character "\n"
if (strpos($value, "\n") !== false) { if (strpos($value, "\n") !== false) {
$value = PHPExcel_Shared_String::SanitizeUTF8($value); $value = PHPExcel_Shared_String::SanitizeUTF8($value);
$cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING); $cell->setValueExplicit($value, DataType::TYPE_STRING);
// Set style // Set style
$cell->getWorksheet()->getStyle($cell->getCoordinate()) $cell->getWorksheet()->getStyle($cell->getCoordinate())
->getAlignment()->setWrapText(true); ->getAlignment()->setWrapText(true);

View File

@ -27,7 +27,7 @@ namespace PHPExcel\Chart;
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class PHPExcel_Chart_DataSeries class DataSeries
{ {
const TYPE_BARCHART = 'barChart'; const TYPE_BARCHART = 'barChart';
const TYPE_BARCHART_3D = 'bar3DChart'; const TYPE_BARCHART_3D = 'bar3DChart';

View File

@ -27,7 +27,7 @@ namespace PHPExcel\Chart;
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE## * @version ##VERSION##, ##DATE##
*/ */
class Exception extends PHPExcel_Exception class Exception extends \PHPExcel\Exception
{ {
/** /**
* Error handler callback * Error handler callback

View File

@ -123,7 +123,7 @@ class Properties
/** /**
* Create a new PHPExcel_DocumentProperties * Create a new Document Properties instance
*/ */
public function __construct() public function __construct()
{ {

View File

@ -65,7 +65,7 @@ class Security
private $workbookPassword = ''; private $workbookPassword = '';
/** /**
* Create a new PHPExcel_DocumentSecurity * Create a new Document Security instance
*/ */
public function __construct() public function __construct()
{ {

View File

@ -951,8 +951,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
} }
// Extract all cell references in $ref // Extract all cell references in $ref
$aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($ref); foreach (PHPExcel_Cell::extractAllCellReferencesInRange($ref) as $reference) {
foreach ($aReferences as $reference) {
$docSheet->getStyle($reference)->setConditionalStyles($conditionalStyles); $docSheet->getStyle($reference)->setConditionalStyles($conditionalStyles);
} }
} }
@ -1178,8 +1177,7 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
$stRange = $docSheet->shrinkRangeToFit($range); $stRange = $docSheet->shrinkRangeToFit($range);
// Extract all cell references in $range // Extract all cell references in $range
$aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($stRange); foreach (PHPExcel_Cell::extractAllCellReferencesInRange($stRange) as $reference) {
foreach ($aReferences as $reference) {
// Create validation // Create validation
$docValidation = $docSheet->getCell($reference)->getDataValidation(); $docValidation = $docSheet->getCell($reference)->getDataValidation();
$docValidation->setType((string) $dataValidation["type"]); $docValidation->setType((string) $dataValidation["type"]);

View File

@ -4883,8 +4883,7 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
foreach ($cellRangeAddresses as $cellRange) { foreach ($cellRangeAddresses as $cellRange) {
$stRange = $this->phpSheet->shrinkRangeToFit($cellRange); $stRange = $this->phpSheet->shrinkRangeToFit($cellRange);
$stRange = PHPExcel_Cell::extractAllCellReferencesInRange($stRange); foreach (PHPExcel_Cell::extractAllCellReferencesInRange($stRange) as $coordinate) {
foreach ($stRange as $coordinate) {
$objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation(); $objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation();
$objValidation->setType($type); $objValidation->setType($type);
$objValidation->setErrorStyle($errorStyle); $objValidation->setErrorStyle($errorStyle);

Some files were not shown because too many files have changed in this diff Show More