Link Search Menu Expand Document

SSpread.ColMerge Property

Set whether to merge (group) cells with the same contents in a column as one cell that spans multiple rows.

Before setting this property, use the Col property to specify the target column.

Specify the following values. The initial value is $MergeNone.

Constant Value Description
$MergeNone 0 Do not merge
$MergeAlways 1 Always merge
If cells with the same content are consecutive, they will always be merged.
$MergeRestricted 2 Restrict merge
If cells with the same contents are consecutive, they will be merged only if the cells to the left are merged.

Operation Example

login image

For the merged cells, the settings of the upper left cell (background color, etc.) are enabled.

The data in the other merged cells will only be hidden and not deleted.

Row merging is set in the RowMerge property.

Example of usage

Col = 1;
ColMerge = $MergeAlways;
Col = 2;
ColMerge = $MergeRestricted;

Related Item
RowMerge property