Link Search Menu Expand Document

SSpread.AddCellSpan Method

Explanation Merge cells.

By merging cells, multiple cells become one big cell.
In the merged cells, the data in the first cell specified in the arguments col, row occupy the entire merged area. Each other cell keeps the data as it is, but it disappears.

To see the state of cell merging, use the GetCellSpan method. To unmerge cells, use the RemoveCellSpan method.

Spreadsheets containing merged cells will no longer be reorderable.
Call format AddCellSpan(col, row, numcols, numrows)
Return value None
Arguments col Column number of the cell to start merging
row Row number of cell to start merging
numcols Number of columns to join
numrows Number of rows to join
Exception EXT-28 An error occurred in the AddCellSpan method
Example of use
    AddCellSpan(2, 3, 4, 4);
    var span = GetCellSpan(4, 4);
    if (span != $GetCellSpanNo) {
        print(span.ColAnchor, span.RowAnchor, span.NumCols, span.NumRows, "\n");
    }
    RemoveCellSpan(span.ColAnchor, span.RowAnchor);
    
Related item GetCellSpan, RemoveCellSpan methods