fixing bug #23730, some sheet names weren't recognized
git-svn-id: https://svn.php.net/repository/pear/packages/Spreadsheet_Excel_Writer/trunk@134158 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9c99e5a91b
commit
543c4e28c0
|
|
@ -547,6 +547,11 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
}
|
}
|
||||||
// match external ranges like Sheet1:Sheet2!A1:B2
|
// match external ranges like Sheet1:Sheet2!A1:B2
|
||||||
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?(\d+)\:([A-I]?[A-Z])?(\d+)$/",$token))
|
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?(\d+)\:([A-I]?[A-Z])?(\d+)$/",$token))
|
||||||
|
{
|
||||||
|
return $this->_convertRange3d($token);
|
||||||
|
}
|
||||||
|
// match external ranges like 'Sheet1:Sheet2'!A1:B2
|
||||||
|
elseif (preg_match("/^'[A-Za-z0-9_ ]+(\:[A-Za-z0-9_ ]+)?'\!([A-I]?[A-Z])?(\d+)\:([A-I]?[A-Z])?(\d+)$/",$token))
|
||||||
{
|
{
|
||||||
return $this->_convertRange3d($token);
|
return $this->_convertRange3d($token);
|
||||||
}
|
}
|
||||||
|
|
@ -1129,11 +1134,17 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
{
|
{
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
// If it's an external range
|
// If it's an external range like Sheet1:Sheet2!A1:B2
|
||||||
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$token) and
|
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$token) and
|
||||||
!ereg("[0-9]",$this->_lookahead))
|
!ereg("[0-9]",$this->_lookahead))
|
||||||
{
|
{
|
||||||
return $token;
|
return $token;
|
||||||
|
}
|
||||||
|
// If it's an external range like 'Sheet1:Sheet2'!A1:B2
|
||||||
|
elseif (preg_match("/^'[A-Za-z0-9_ ]+(\:[A-Za-z0-9_ ]+)?'\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$token) and
|
||||||
|
!ereg("[0-9]",$this->_lookahead))
|
||||||
|
{
|
||||||
|
return $token;
|
||||||
}
|
}
|
||||||
// If it's a number (check that it's not a sheet name or range)
|
// If it's a number (check that it's not a sheet name or range)
|
||||||
elseif (is_numeric($token) and
|
elseif (is_numeric($token) and
|
||||||
|
|
@ -1387,6 +1398,13 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
|
||||||
}
|
}
|
||||||
// If it's an external range (Sheet1!A1:B2)
|
// If it's an external range (Sheet1!A1:B2)
|
||||||
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$this->_current_token))
|
elseif (preg_match("/^[A-Za-z0-9_]+(\:[A-Za-z0-9_]+)?\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$this->_current_token))
|
||||||
|
{
|
||||||
|
$result = $this->_current_token;
|
||||||
|
$this->_advance();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
// If it's an external range ('Sheet1'!A1:B2)
|
||||||
|
elseif (preg_match("/^'[A-Za-z0-9_ ]+(\:[A-Za-z0-9_ ]+)?'\!([A-I]?[A-Z])?[0-9]+:([A-I]?[A-Z])?[0-9]+$/",$this->_current_token))
|
||||||
{
|
{
|
||||||
$result = $this->_current_token;
|
$result = $this->_current_token;
|
||||||
$this->_advance();
|
$this->_advance();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue