# Creating a Span in a Header

Customize the default appearance of header cells by creating cell spans in them using Spread for ASP.NET. Learn more in documentation.

## Content

You can create cell spans in a header, for example, to make a header for multiple columns of data, as shown in the following figure.
![Sheet with Row and Column Headers Spanned](https://cdn.mescius.io/document-site-files/images/346c9178-0ed8-4fb9-908b-1565b22fb408/artwork/hdrmulti1.png)
For information on creating multiple rows in the column headers or multiple columns in the row headers, refer to [Creating a Header with Multiple Rows or Columns](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-appearSet/spweb-appearHeader/spweb-HeaderMulti).
You can create cell spans in either the column or row headers or both. For more background about creating cell spans, refer to [Spanning Cells](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-appearSet/spweb-appearCell/spweb-cellspan).
You can customize the labels in these headers. For instructions for customizing the labels, see [Customizing Header Label Text](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-appearSet/spweb-appearHeader/spweb-HeaderContent).

## Using a Shortcut

Define the number of rows in the column header (and columns in the rows header) and then set the header cells to span using the [Add](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Model.DefaultSheetSpanModel.Add.html) property in the span model.

## Example

This example creates multiple headers and adds cell spans.

```csharp
// Set the number or rows and columns in the headers.
FpSpread1.Sheets[0].ColumnHeader.RowCount = 3;
FpSpread1.Sheets[0].RowHeader.ColumnCount = 2;
// Span the header cells as needed.
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(0, 0, 1, 8);
FpSpread1.Sheets[0].RowHeaderSpanModel.Add(0,0,12,1);
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(1, 0, 1, 2);
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(1, 2, 1, 2);
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(1, 4, 1, 2);
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(1, 6, 1, 2);
FpSpread1.Sheets[0].ColumnHeaderSpanModel.Add(1, 8, 1, 2);
```

```vbnet
'Set the number or rows and columns in the headers.
FpSpread1.Sheets(0).ColumnHeader.RowCount = 3
FpSpread1.Sheets(0).RowHeader.ColumnCount = 2
'Span the header cells as needed.
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(0, 0, 1, 8)
FpSpread1.Sheets(0).RowHeaderSpanModel.Add(0,0,12,1)
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(1, 0, 1, 2)
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(1, 2, 1, 2)
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(1, 4, 1, 2)
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(1, 6, 1, 2)
FpSpread1.Sheets(0).ColumnHeaderSpanModel.Add(1, 8, 1, 2)
```

## Using the Spread Designer

1. Select the **Settings** menu, and then the **Header Editor** icon.
2. Select a cell (the cells represent the header cells in this editor). Set the number of columns or rows to span with the **ColumnSpan** or **RowSpan** property.
3. When done, choose **Apply** and **OK** to apply your changes.
4. Click **Apply and Exit** to close the Spread Designer.

## See Also

[ColumnHeaderSpanModel Property](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.ColumnHeaderSpanModel.html)
[RowHeaderSpanModel Property](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.RowHeaderSpanModel.html)