diff --git a/ClosedXML/Excel/Cells/XLCell.cs b/ClosedXML/Excel/Cells/XLCell.cs index b089fcd8c..fb68d57f4 100644 --- a/ClosedXML/Excel/Cells/XLCell.cs +++ b/ClosedXML/Excel/Cells/XLCell.cs @@ -75,6 +75,8 @@ internal XLCell(XLWorksheet worksheet, XLSheetPoint point) : this(worksheet, poi public XLAddress Address => new(Worksheet, _rowNumber, _columnNumber, false, false); + public bool? IsInferiorMergedCellUserDefined { get; set; } + internal XLSheetPoint SheetPoint => new(_rowNumber, _columnNumber); #region Slice fields @@ -1997,6 +1999,11 @@ static bool IsHorizontalBorderBlank(XLWorksheet sheet, int borderRow, int border internal bool IsInferiorMergedCell() { + if (this.IsInferiorMergedCellUserDefined.HasValue) + { + return this.IsInferiorMergedCellUserDefined.Value; + } + return this.IsMerged() && !this.Address.Equals(this.MergedRange().RangeAddress.FirstAddress); }