Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Collapse]Spreadsheet
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
    [Collapse]Spreadsheet Document
      Workbook
      Worksheets
      Cells and Cell Ranges
      Rows and Columns
      Comments
      Measure Units
     Supported Formats
     Import and Export
    [Expand]Cell Basics
    [Expand]Spreadsheet Formulas
     Defined Names
     Data Validation
    [Expand]Data Presentation
    [Expand]Charting
     Printing
    [Expand]Mail Merge
     Protection
     Adaptivity
     Keyboard Shortcuts
   [Expand]Visual Elements
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Worksheets

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).

To set the active worksheet within a workbook, use the WorksheetCollection.ActiveWorksheet property (see the How to: Set an Active 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.

Property/Method

Description

Example

Worksheet.Rows

Returns the collection of all worksheet rows.

How to: Access a Row or Column

Worksheet.Columns

Returns the collection of all worksheet columns.

How to: Access a Row or Column

Worksheet.Cells

Returns the collection of all worksheet cells. You can use this property to format the entire worksheet at once, or access individual cells.

How to: Access a Cell in a Worksheet

Worksheet.Range

Provides access to a range of cells.

How to: Access a Range of Cells

Worksheet.SelectedCell, Worksheet.Selection

Specifies an active cell and range of cells selected in the worksheet.

How to: Obtain Selected Range and Active Cell

Worksheet.DefinedNames

Returns the collection of worksheet defined names associated with cells, cell ranges, formulas and constants.

How to: Create a Named Range of Cells

How to: Create Named Formulas

Worksheet.Hyperlinks

Returns the collection of hyperlinks contained in worksheet cells.

How to: Add a Hyperlink to a Cell

Worksheet.Shapes

Returns the collection of all graphics contained in the worksheet.

How to: Insert and Delete Pictures

How to: Modify an Embedded Picture

Worksheet.Tables

Returns the collection of tables contained in the worksheet.

How to: Create a Table

Worksheet.GetUsedRange

Returns a worksheet cell range that contains data.

Worksheet.Name

Specifies the worksheet name.

How to: Rename a Worksheet

Worksheet.Index, Worksheet.Move

Control worksheet position within a workbook.

How to: Move a Worksheet to Another Location in a Workbook

Worksheet.Visible, Worksheet.VisibilityType

Control worksheet visibility.

How to: Show and Hide a Worksheet

Expanded See Also

Is this topic helpful?​​​​​​​