Provide a method to easily access the array formula range for a cell containing an array formula

This commit is contained in:
MarkBaker
2022-02-02 14:59:06 +01:00
parent 9f3db9968f
commit 1fa690c8d6
+11
View File
@@ -458,6 +458,17 @@ class Cell
return false;
}
public function arrayFormulaRange(): ?string
{
if ($this->isFormula() && $this->isArrayFormula()) {
$formulaAttributes = $this->getFormulaAttributes();
return $formulaAttributes['ref'] ?? null;
}
return null;
}
/**
* Does this cell contain Data validation rules?
*