When you create a sheet, it is automatically created with three rows and four columns. You can change the number to up to two billion rows and columns.
Using the Properties Window
- At design time, in the Properties window, select the FpSpread component.
- Select the Sheets property.
- Click the button to display the SheetView Collection Editor.
- Set RowCount and ColumnCount under the Layout section.
- Click OK to close the editor.
Using a Shortcut
Set the RowCount or ColumnCount property for the Sheets shortcut.
Example
This example code sets the first sheet to have 10 columns and 100 rows.
C# | Copy Code |
---|---|
FpSpread1.Sheets[0].RowCount = 100; FpSpread1.Sheets[0].ColumnCount = 10; |
VB | Copy Code |
---|---|
FpSpread1.Sheets(0).RowCount = 100 FpSpread1.Sheets(0).ColumnCount = 10 |
Using Code
Set the RowCount or ColumnCount property for a SheetView class.
Example
This example code sets the first sheet to have 100 rows and 10 columns.
C# | Copy Code |
---|---|
FarPoint.Web.Spread.SheetView Sheet0; Sheet0 = FpSpread1.Sheets[0]; Sheet0.RowCount = 100; Sheet0.ColumnCount = 10; |
VB | Copy Code |
---|---|
Dim Sheet0 As FarPoint.Web.Spread.SheetView Sheet0 = FpSpread1.Sheets(0) Sheet0.RowCount = 100 Sheet0.ColumnCount = 10 |
Using the Spread Designer
- Select the Settings menu.
- At the bottom, select the sheet for which you want to set the number of rows or columns.
- Select the General icon under the Sheet Settings section and change the RowCount or ColumnCount setting.
- Click OK.
- Click Apply and Exit to close the Spread Designer.