Spread ASP.NET 6.0 Product Documentation
AddSpanCell Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : AddSpanCell Method


row
Row index of cell at which to start the span
column
Column index of cell at which to start the span
rowCount
Number of rows to span
columnCount
Number of columns to span

Glossary Item Box

Adds a span of cells to a sheet.

Syntax

Visual Basic (Declaration) 
Public Sub AddSpanCell( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
 
instance.AddSpanCell(row, column, rowCount, columnCount)
C# 
public void AddSpanCell( 
   int row,
   int column,
   int rowCount,
   int columnCount
)

Parameters

row
Row index of cell at which to start the span
column
Column index of cell at which to start the span
rowCount
Number of rows to span
columnCount
Number of columns 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.

When you create a span of cells, the data in the first cell in the span (designated by the row and column 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.

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

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

Example

This example creates a SheetView object, assigns it to the active sheet and sets up a spanned cell.
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
sv.AddSpanCell(0,0,3,3);
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
sv=FpSpread1.ActiveSheetView
sv.AddSpanCell(0,0,3,3)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.