PHP 8.0 PHP 엑셀 삭제된 split() 함수 대체
lib/Excel/php_writeexcel 는 영카트에서는 PHP 5.2 이하일 때만 쓰고 있으나 유저들이 씁니다.
This commit is contained in:
@ -663,10 +663,10 @@ function _convertRange2d($range)
|
||||
|
||||
// Split the range into 2 cell refs
|
||||
if (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\:\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
|
||||
list($cell1, $cell2) = split(':', $range);
|
||||
list($cell1, $cell2) = explode(':', $range);
|
||||
}
|
||||
elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\.\.\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
|
||||
list($cell1, $cell2) = split('\.\.', $range);
|
||||
list($cell1, $cell2) = preg_split('/\.\./', $range);
|
||||
}
|
||||
else {
|
||||
// TODO: use real error codes
|
||||
@ -714,7 +714,7 @@ function _convertRange3d($token)
|
||||
$class = 2; // as far as I know, this is magick.
|
||||
|
||||
// Split the ref at the ! symbol
|
||||
list($ext_ref, $range) = split('!', $token);
|
||||
list($ext_ref, $range) = explode('!', $token);
|
||||
|
||||
// Convert the external reference part
|
||||
$ext_ref = $this->_packExtRef($ext_ref);
|
||||
@ -723,7 +723,7 @@ function _convertRange3d($token)
|
||||
}
|
||||
|
||||
// Split the range into 2 cell refs
|
||||
list($cell1, $cell2) = split(':', $range);
|
||||
list($cell1, $cell2) = explode(':', $range);
|
||||
|
||||
// Convert the cell references
|
||||
if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $cell1))
|
||||
@ -812,7 +812,7 @@ function _convertRef3d($cell)
|
||||
$class = 2; // as far as I know, this is magick.
|
||||
|
||||
// Split the ref at the ! symbol
|
||||
list($ext_ref, $cell) = split('!', $cell);
|
||||
list($ext_ref, $cell) = explode('!', $cell);
|
||||
|
||||
// Convert the external reference part
|
||||
$ext_ref = $this->_packExtRef($ext_ref);
|
||||
@ -853,7 +853,7 @@ function _packExtRef($ext_ref) {
|
||||
// Check if there is a sheet range eg., Sheet1:Sheet2.
|
||||
if (preg_match("/:/", $ext_ref))
|
||||
{
|
||||
list($sheet_name1, $sheet_name2) = split(':', $ext_ref);
|
||||
list($sheet_name1, $sheet_name2) = explode(':', $ext_ref);
|
||||
|
||||
$sheet1 = $this->_getSheetIndex($sheet_name1);
|
||||
if ($sheet1 == -1) {
|
||||
|
||||
Reference in New Issue
Block a user