# Removing a Row or Column

Spread for ASP.NET allows you to remove one or more rows or columns from a spreadsheet. You can also allow or deny the end user from removing rows.

## Content

You can remove one or more rows or columns from a sheet and you can allow the end user to remove rows or prohibit them from removing rows.
If you simply want to hide the row or column from the end user, but not remove it from the sheet, refer to [Showing or Hiding Rows or Columns](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-appearSet/spweb-appearRowCol/spweb-RowColHide).

## Using a Shortcut

1. Use the [RemoveRows](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.RemoveRows.html) or [RemoveColumns](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.RemoveColumns.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 first row or column to remove.
3. Set the *count* parameter to specify the number of rows or columns to remove.

**Example**
This example code removes two rows.

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

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

## Using Code

1. Use the [RemoveRows](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.RemoveRows.html) or [RemoveColumns](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.SheetView.RemoveColumns.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 first row or column to remove.
3. Set the *count* parameter to specify the number of rows or columns to remove.

**Example**
This example code removes two rows.

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

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

## Using the Spread Designer

1. Select the **Data** menu.
2. At the bottom, select the sheet for which you want to remove rows or columns.
3. In the **Rows or Columns** area, select an existing row or column in the list.
4. Click the **Delete** icon. Select **Delete Row** or **Delete Column** to remove a row or column.
5. Click **OK**.
6. Click **Apply and Exit** to close the Spread Designer.