# Customizing the Number of Rows or Columns

Learn how to customize the number of rows and columns in your sheet, from zero to two billion, and restrict user access with Spread.NET's SheetView properties.

## Content

When you create a sheet, it is automatically created with five hundred columns and five hundred rows. You can change the number to zero or up to two billion column and rows.
For more details, refer to the SheetView.[RowCount](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RowCount.html) property and SheetView.[ColumnCount](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.ColumnCount.html) property.
You can also restrict the user from accessing various rows and columns.

## Using the Properties Window

1. At design time, in the **Properties** window, select the Spread component.
2. Select the **Sheets** property.
3. Click the button to display the **SheetView Collection Editor**.
4. In the **Members** list, select the sheet for which to set the number of columns or rows.
5. In the properties list, set the **ColumnCount** property to set the number of columns and the **RowCount** property to set the number of rows.
6. Click **OK** to close the editor.

## Using a Shortcut

Set the **ColumnCount** or **RowCount** property for the Sheets shortcut object.
**Example**
This example code sets the first sheet to have 10 columns and 100 rows.

```csharp
fpSpread1.Sheets[0].ColumnCount = 10;
fpSpread1.Sheets[0].RowCount = 100;
```

```vbnet
fpSpread1.Sheets(0).ColumnCount = 10
fpSpread1.Sheets(0).RowCount = 100
```

## Method to set

Set the [ColumnCount](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.ColumnCount.html) or [RowCount](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.RowCount.html) property for a [SheetView](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.html) class.
**Example**
This example code sets the first sheet to have 10 columns and 100 rows.

```csharp
FarPoint.Win.Spread.SheetView Sheet0;
Sheet0 = fpSpread1.Sheets[0];
Sheet0.ColumnCount = 10;
Sheet0.RowCount = 100;
```

```vbnet
Dim Sheet0 As FarPoint.Win.Spread.SheetView
Sheet0 = fpSpread1.Sheets(0)
Sheet0.ColumnCount = 10
Sheet0.RowCount = 100
```

## Using the Spread Designer

1. Select the sheet tab for the sheet for which you want to set the number of columns or rows.
2. From the property list for the sheet, in the **Appearance** category, select **Columns** or **Rows** to expand the properties for the columns or rows in the sheet.
3. In the list of properties for the columns or rows, set the **Count** property.
4. From the **File** menu choose **Apply and Exit** to apply your changes to the component and exit Spread Designer.

## See Also

[Rows and Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol)
[Adding a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcoladd)
[Removing a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolremove)
[Showing or Hiding a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolhide)
[Setting the Row Height or Column Width](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolsize)
[Setting Fixed (Frozen) Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-freeze)
[Moving Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-usermove)
[Creating Alternating Rows](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolalt)
[Setting up Preview Rows](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-previewrow)
[Input Data in Rows or Columns](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcol-userentry)
[Rows or Columns That Have Data](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-rowcolnonempty)
[Adding a Tag to a Row or Column](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-rowcol/spwin-tags-rowcol)