[bz-69905] check cell before recursing (#978)

This commit is contained in:
PJ Fanning 2025-12-17 21:29:03 +01:00 committed by GitHub
parent 08e9bb00d4
commit 3a69605f4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -410,7 +410,9 @@ public final class XSSFCell extends CellBase {
/* In an excel generated array formula, the formula property might be set, but the string is empty in related cells */
if (f == null || f.getStringValue().isEmpty()) {
XSSFCell cell = getSheet().getFirstCellInArrayFormula(this);
return cell.getCellFormula(fpb);
if (cell != this) {
return cell.getCellFormula(fpb);
}
}
}
if (f == null) {