# Adding a Row or Column

Spread for ASP.NET allows you to add one or more rows or columns to a spreadsheet, and specify where the row or column needs to be added.

## Content

You can add one or more rows or columns to a sheet, and specify where the row or column is added. You can use the methods in the [SheetView](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.html) class or the methods in the [DefaultSheetDataModel](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Model.DefaultSheetDataModel.html) class.
For adding an unbound row to a sheet in a component that is bound to a data source, refer to [Adding an Unbound Row](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-databound/spweb-dbunboundrow).

## Using a Shortcut

1. Use the [AddRows](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AddRows.html) method or [AddColumns](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AddColumns.html) method for the [Sheets](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.Sheets.html) shortcut.
2. Set the *row* or *column* parameter to specify the row or column before which to add the rows or columns.
3. Set the *count* parameter to specify the number of rows or columns to add.

**Example**
This example code adds two columns before column 6.

```csharp
FpSpread1.Sheets[0].AddColumns(6,2);
```

```vbnet
FpSpread1.Sheets(0).AddColumns(6,2)
```

## Using Code

1. Use the [AddRows](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AddRows.html) method or [AddColumns](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.AddColumns.html) method for a [SheetView](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.html) object.
2. Set the *row* or *column* parameter to specify the row or column before which to add the rows or columns.
3. Set the *count* parameter to specify the number of rows or columns to add.

**Example**
This example code adds two columns before column 6.

```csharp
FarPoint.Web.Spread.SheetView Sheet0;
Sheet0 = FpSpread1.Sheets[0];
Sheet0.AddColumns(6,2);
```

```vbnet
Dim Sheet0 As FarPoint.Web.Spread.SheetView
Sheet0 = FpSpread1.Sheets(0)
Sheet0.AddColumns(6, 2)
```

## Using the Spread Designer

1. Select the **Data** menu.
2. At the bottom, select the sheet for which you want to add rows or columns.
3. Select an existing row or column (the new row or column is inserted before this row or column).
4. Click the **Insert** icon and then select **Insert Row** or **Insert Column**.
5. Click **OK**.
6. Click **Apply and Exit** to close the Spread Designer.