Identifying vertically or horizontally merged cells

can you add a property to identify whether a cell is vertically or horizontally merged?

instead of IsMerged as IsVMerged or IsHMerged

instead, how would you suggest to do it?

thanks

Hi,

Please use this code to decide if the cell is vertically merged or horizontally merged or both.

C#




if(cell.IsMerged == true)

{


Range rng = cell.GetMergedRange();


if(rng.ColumnCount>1)

{

Debug.WriteLine(“cell is horizontally merged”);

}


if (rng.RowCount > 1)

{

Debug.WriteLine(“cell is vertically merged”);

}

}