mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-24 17:19:29 +00:00
Bugfix: Work item 15379 - Named ranges with dot don't get parsed properly
Bugfix: Work item 15096 - insertNewRowBefore fails to consistently update references Bugfix: "i" is not a valid character for Excel date format masks (in isDateTimeFormatCode() method) git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@69064 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
@@ -137,7 +137,8 @@ class PHPExcel_ReferenceHelper
|
||||
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
||||
// Formula should be adjusted
|
||||
$pSheet->getCell($newCoordinates)
|
||||
->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||
->setValue($this->updateFormulaReferences($cell->getValue(),
|
||||
$pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||
} else {
|
||||
// Formula should not be adjusted
|
||||
$pSheet->getCell($newCoordinates)->setValue($cell->getValue());
|
||||
@@ -145,6 +146,16 @@ class PHPExcel_ReferenceHelper
|
||||
|
||||
// Clear the original cell
|
||||
$pSheet->getCell($cell->getCoordinate())->setValue('');
|
||||
|
||||
} else {
|
||||
/* We don't need to update styles for rows/columns before our insertion position,
|
||||
but we do still need to adjust any formulae in those cells */
|
||||
if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) {
|
||||
// Formula should be adjusted
|
||||
$cell->setValue($this->updateFormulaReferences($cell->getValue(),
|
||||
$pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user