Bugfix: Work item GH-80 - "Sheet index is out of bounds." Exception

This commit is contained in:
Mark Baker 2013-02-27 12:18:34 +00:00
parent 7b922bbf77
commit e47b543c89
2 changed files with 11 additions and 10 deletions

View File

@ -1608,17 +1608,18 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
break;
default:
if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) {
$range = explode('!', (string)$definedName);
if (count($range) == 2) {
$range[0] = str_replace("''", "'", $range[0]);
$range[0] = str_replace("'", "", $range[0]);
if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) {
$extractedRange = str_replace('$', '', $range[1]);
$scope = $docSheet->getParent()->getSheet((string)$definedName['localSheetId']);
$scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]);
$excel->addNamedRange( new PHPExcel_NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope) );
}
}
}
break;
}
} else if (!isset($definedName['localSheetId'])) {

View File

@ -50,7 +50,7 @@ Fixed in develop branch:
- Bugfix: (MBaker) Work item GH-104 - echo statements in HTML.php
- Feature: (Progi1984) Work item GH-8/CP11704 : Conditional formatting in Excel 5 Writer
- Bugfix: (MBaker) Work item GH-113 - canRead() Error for GoogleDocs ODS files: in ODS files from Google Docs there is no mimetype file
- Bugfix: (MBaker) Work item GH-80 - "Sheet index is out of bounds." Exception
--------------------------------------------------------------------------------
BREAKING CHANGE! As part of the planned changes for handling array formulae in