Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Understanding the Spreadsheet Objects > Working with Rows and Columns > Customizing the Number of Rows or Columns |
When you create a sheet, it is automatically created with five hundred columns and five hundred rows. You can change the number from zero up to two billion column and rows.
For more details, refer to the SheetView.RowCount property and SheetView.ColumnCount property.
You can also restrict the user from accessing various rows and columns. For more information, refer to Allowing User Interaction with Rows and Columns.
Set the ColumnCount or RowCount property for the Sheets shortcut object.
This example code sets the first sheet to have 10 columns and 100 rows.
C# |
Copy Code
|
---|---|
fpSpread1.Sheets[0].ColumnCount = 10; fpSpread1.Sheets[0].RowCount = 100; |
VB |
Copy Code
|
---|---|
FpSpread1.Sheets(0).ColumnCount = 10 FpSpread1.Sheets(0).RowCount = 100 |
Set the ColumnCount or RowCount property for a SheetView object.
This example code sets the first sheet to have 10 columns and 100 rows.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.SheetView Sheet0; Sheet0 = fpSpread1.Sheets[0]; Sheet0.ColumnCount = 10; Sheet0.RowCount = 100; |
VB |
Copy Code
|
---|---|
Dim Sheet0 As FarPoint.Win.Spread.SheetView Sheet0 = FpSpread1.Sheets(0) Sheet0.ColumnCount = 10 Sheet0.RowCount = 100 |