aspnet-16185-aspnet-webforms-controls-spreadsheet-concepts-spreadsheet-document-rows-and-columns.md
Worksheet cells are organized into 1,048,576 rows and 16,384 columns. The number of rows and columns is permanently fixed.
At the left and at the top of a worksheet there are row and column headings (rows are numbered - “1”, “2”, “3”,…, “1048576”, and columns are lettered - “A”, “B”, “C”,…,”XFD”). An end-user can select an entire row or column by clicking the corresponding row or column heading.
All worksheet rows and columns are stored in the RowCollection and ColumnCollection objects, which you can access from the Worksheet.Rows and Worksheet.Columns properties. The Row and Column objects specify an individual row or column, respectively. Use the properties and methods of these objects to manage worksheet rows and columns.
|
Property/Method
|
Description
|
Example
| | --- | --- | --- | |
|
Provide access to an individual row or column by its heading (Row.Heading or Column.Heading) or index (Row.Index or Column.Index ).
|
How to: Access a Row or Column
| |
RowCollection.Insert, Row.Insert
ColumnCollection.Insert, Column.Insert
|
Insert new rows and columns into a worksheet.
|
How to: Add a New Row or Column to a Worksheet
| |
|
Copies a row or column.
|
| |
RowCollection.Remove, Row.Delete
ColumnCollection.Remove, Column.Delete
|
Remove specified rows and columns from a worksheet.
|
How to: Delete a Row or Column from a Worksheet
| |
Row.Visible, RowCollection.Hide, RowCollection.Unhide
Column.Visible, ColumnCollection.Hide, ColumnCollection.Unhide
|
Control row or column visibility in a worksheet.
|
How to: Show or Hide a Row or Column
| |
Worksheet.FreezeRows, Worksheet.FreezeColumns
Worksheet.FreezePanes, Worksheet.UnfreezePanes
|
Freeze and unfreeze rows and columns at the top and on the left side of the worksheet.
|
How to: Freeze and Unfreeze Rows and Columns
| |
Row.Height, CellRange.RowHeight, Worksheet.DefaultRowHeight
Column.Width, Column.WidthInCharacters, Column.WidthInPixels
CellRange.ColumnWidth, CellRange.ColumnWidthInCharacters
Worksheet.DefaultColumnWidth, Worksheet.DefaultColumnWidthInCharacters, Worksheet.DefaultColumnWidthInPixels
|
Specify row height and column width in a worksheet.
|
How to: Specify Row Height or Column Width
|
See Also