Spread 8.0 Documentation
AddCellSpan Method
Support Options
ActiveX Reference > ActiveX Methods > AddCellSpan Method

Glossary Item Box

AddCellSpan Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Adds a span of cells.

Syntax

C++

BOOL CSpreadSheet::AddCellSpan(long lCol, long lRow, long lNumCols, long lNumRows);

Visual Basic

fpSpread1.AddCellSpan(ByVal lCol As Long, ByVal lRow As Long, ByVal lNumCols As Long, ByVal lNumRows As Long) As Boolean

Parameters

The following parameters are available:

Parameter Description
lCol Column number of cell at which to start the span
lRow Row number of cell at which to start the span
lNumCols Number of columns to span
lNumRows Number of rows to span

Remarks

Creating a span of cells creates one large cell where there had previously been several. For example, if you create a span of cells from cell A1 to cell C2, cell A1 then appears to occupy the space from cell A1 through cell C2, as shown in the following figure.

When you create a span of cells, the data in the first cell in the span (designated by the lCol and lRow parameters) occupies all the space in the span. When you create a span, the data that was in each of the cells in the span is still in each cell, but not displayed. The data is simply hidden by the span range. Also, the cell types of the cells combined in the span are not changed.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

You can return whether a specified cell is in a span of cells by calling the GetCellSpan method. You can remove a span from a range of cells by calling the RemoveCellSpan method.

Note: You cannot sort a sheet that has spanned cells.

Spread Designer

Choose the Cell menu, and then the Span menu, and then make changes with the Column and Row combo boxes and Columns to Span and Rows to Span spin boxes in the Create Span dialog box.

Return Type

True if successful; otherwise, False.

See Also

Spanning Cells

Sheet property

GetCellSpan, RemoveCellSpan methods

DLL Correspondence

SSAddCellSpan function

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.