update lib/Excel

This commit is contained in:
Amberstone 2024-09-19 20:44:10 +09:00
parent 4cf3aeeb88
commit 42663073c5
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
10 changed files with 1373 additions and 1391 deletions

Binary file not shown.

View file

@ -268,4 +268,3 @@ class OLERead {
}
}
?>

View file

@ -205,5 +205,3 @@ class writeexcel_biffwriter {
}
}
?>

View file

@ -691,5 +691,3 @@ class writeexcel_format {
}
}
?>

View file

@ -153,7 +153,7 @@ function parse_formula() {
$this->_formula = $formula;
$this->_current_char = 0;
$this->_lookahead = $this->_formula{1};
$this->_lookahead = $this->_formula[1];
$this->_advance($formula);
$parsetree = $this->_condition();
@ -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) {
@ -1005,7 +1005,7 @@ function _cellToRowcol($cell)
$col = 0;
for ($i=0; $i < strlen($col_ref); $i++)
{
$col += (ord($col_ref{$i}) - ord('A') + 1) * pow(26, $expn);
$col += (ord($col_ref[$i]) - ord('A') + 1) * pow(26, $expn);
$expn--;
}
@ -1027,19 +1027,19 @@ function _advance()
// eat up white spaces
if ($i < strlen($this->_formula))
{
while ($this->_formula{$i} == " ") {
while ($this->_formula[$i] == " ") {
$i++;
}
if ($i < strlen($this->_formula) - 1) {
$this->_lookahead = $this->_formula{$i+1};
$this->_lookahead = $this->_formula[$i+1];
}
$token = "";
}
while ($i < strlen($this->_formula))
{
$token .= $this->_formula{$i};
$token .= $this->_formula[$i];
if ($i < strlen($this->_formula) - 1) {
$this->_lookahead = $this->_formula{$i+1};
$this->_lookahead = $this->_formula[$i+1];
}
else {
$this->_lookahead = '';
@ -1054,7 +1054,7 @@ function _advance()
return 1;
}
if ($i < strlen($this->_formula) - 2) {
$this->_lookahead = $this->_formula{$i+2};
$this->_lookahead = $this->_formula[$i+2];
}
else {
// if we run out of characters _lookahead becomes empty
@ -1195,7 +1195,7 @@ function parse($formula)
{
$this->_current_char = 0;
$this->_formula = $formula;
$this->_lookahead = $formula{1};
$this->_lookahead = $formula[1];
$this->_advance();
$this->_parse_tree = $this->_condition();
if ($this->isError($this->_parse_tree)) {
@ -1605,6 +1605,3 @@ function toReversePolish($tree = array())
}
}
?>

View file

@ -349,5 +349,3 @@ class writeexcel_olewriter {
}
}
?>

View file

@ -1145,5 +1145,3 @@ function _store_codepage() {
}
}
?>

View file

@ -51,5 +51,3 @@ class writeexcel_workbookbig extends writeexcel_workbook {
}
}
?>

View file

@ -2964,5 +2964,3 @@ function insert_bitmap() {
}
}
?>

View file

@ -1079,6 +1079,4 @@ class Spreadsheet_Excel_Reader
* c-basic-offset: 4
* c-hanging-comment-ender-p: nil
* End:
*/
?>
*/;