diff --git a/src/PhpSpreadsheet/RichText.php b/src/PhpSpreadsheet/RichText.php index 5e77b2b1..7076b1b2 100644 --- a/src/PhpSpreadsheet/RichText.php +++ b/src/PhpSpreadsheet/RichText.php @@ -48,7 +48,7 @@ class RichText implements IComparable // Add cell text and style if ($pCell->getValue() != '') { $objRun = new RichText\Run($pCell->getValue()); - $objRun->setFont(clone $pCell->getParent()->getStyle($pCell->getCoordinate())->getFont()); + $objRun->setFont(clone $pCell->getWorksheet()->getStyle($pCell->getCoordinate())->getFont()); $this->addText($objRun); }