- 3 minutes to read
A workbook consists of worksheets. A worksheet is a grid of cells organized into 1,048,576 rows and 16,384 columns. Each row is numbered ("1", "2", "3", ..., "1048576"), and each column is lettered ("A", "B", "C", ..., "XFD"). Row and column headings are displayed at the left and at the top of a worksheet, respectively.
Worksheet cells can contain data of different types, and formulas. These cells can be formatted. Proper cell formatting improves worksheet appearance, and allows end-users to read, find and understand worksheet data easily. When adjusting cell appearance, you can specify font, font size, character style (bold, italic or underline), text alignment, and different colors for the background and foreground. For details on formatting cells, see the Formatting Cells document, as well as the examples in the Formatting Cells section.
All worksheets in a workbook are stored within the WorksheetCollection, which you can access via the IWorkbook.Worksheets property. To get an individual worksheet, use WorksheetCollection.Item. Each worksheet is accessible by its unique name or position within the workbook (see the How to: Access a Worksheet example).
The Worksheet interface represents a worksheet. It provides a wide range of members to access and manage different worksheet elements. The following table lists the main properties and methods.
Returns the collection of all worksheet rows.
Returns the collection of all worksheet columns.
Returns the collection of all worksheet cells. You can use this property to format the entire worksheet at once, or access individual cells.
Provides access to a range of cells.
Specifies an active cell and range of cells selected in the worksheet.
Returns the collection of worksheet defined names associated with cells, cell ranges, formulas and constants.
Returns the collection of hyperlinks contained in worksheet cells.
Returns the collection of all graphics contained in the worksheet.
Returns the collection of tables contained in the worksheet.
Returns a worksheet cell range that contains data.
Specifies the worksheet name.
Control worksheet position within a workbook.
Control worksheet visibility.