# Adding a Sheet

Use Spread for ASP.NET to add an individual sheet or several sheets. Learn more in documentation.

## Content

You can add a sheet or add several sheets to the component. By default, the component has one sheet, named Sheet 1 and referenced as sheet index 0. The sheet index is zero-based. If you are using custom sheet names be sure to specify the name of the sheet.
In code, you can simply change the number of sheets by changing the [Count](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetViewCollection.Count.html) property or you can explicitly add the sheet(s) by defining new sheets or by using the [Add](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetViewCollection.Add.html) method. The following instructions describe how to add a sheet.
For information on removing a sheet, refer to [Removing a Sheet](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-appearSet/spweb-appearSheet/spweb-SheetRemove).

## Using the Properties Window

1. At design time, in the **Properties** window, select the Sheets property for the FpSpread component.
2. Click the button to display the **SheetView Collection Editor**.
3. Click the **Add** button to add a sheet to the collection.
    A new sheet named Sheet\_n\_ (where *n* is an integer) is added to the component.
4. If you want to change the name of the new sheet, click the **SheetName** property in the property list, and then type the new name for the sheet.
5. Click **OK** to close the editor.

## Using Code

1. Create a new [SheetView](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.html) object.
2. If you want to do so, set properties for the sheet, such as its name.
3. Use the [Add](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetViewCollection.Add.html) method with the [FpSpread](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.html) component [Sheets](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.Sheets.html) shortcut to add the new [SheetView](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.html) object to the collection of sheets ([SheetViewCollection](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetViewCollection.html)) for the component.

## Example

This example code adds a new sheet to the component, then names the sheet "North" and sets it to have 10 columns and 100 rows.

```csharp
// Create a new sheet.
FarPoint.Web.Spread.SheetView newsheet = new FarPoint.Web.Spread.SheetView();
newsheet.SheetName = "North";
newsheet.ColumnCount = 10;
newsheet.RowCount = 100;

// Add the new sheet to the component.
FpSpread1.Sheets.Add(newsheet);
```

```vbnet
' Create a new sheet.
Dim newsheet As New FarPoint.Web.Spread.SheetView()
newsheet.SheetName = "North"
newsheet.ColumnCount = 10
newsheet.RowCount = 100

' Add the new sheet to the component.
FpSpread1.Sheets.Add(newsheet)
```

## Using the Spread Designer

1. Select the **Data** menu. Click on the **Insert** icon.
2. Click the **Insert Sheet** option.
    A new sheet named Sheet\_n\_ (where *n* is an integer) is added to the component.
3. If you want to change the name of the new sheet, click the new sheet in the Properties for Sheet\_n\_ list, and change the **SheetName** property in the property list.
4. Click **Apply and Exit** to close the Spread Designer.