Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Silverlight | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial

What is a Worksheet?

This article will help you get familiar with the concept of a worksheet and its features.

What is a Worksheet

A Worksheet is a type of Sheet and inherits the base Sheet class. The term Worksheet used in Excel documents is a collection of cells organized in rows and columns. It is the working surface you interact with to enter data. Each worksheet contains 1048576 rows and 16384 columns and serves as a giant table that allows you to organize information. Typically, a workbook contains several worksheets with related content and only one of the worksheets is active at a time.

Currently, in SpreadProcessing the Worksheet is the only type of Sheet.

What is in it?

The main characteristics of worksheets can be summarized in the following list:

  • Cells: Each worksheet has a significant number of cells that can be assigned values and various formatting options. The Cells property allows you to insert, manipulate and delete worksheet cells. More information about worksheet cells is available in the What is a Cell? section.

  • Rows and Columns: Cells in a worksheet are organized in rows and columns. The API of a worksheet allows you insert, manipulate and delete rows and columns. Additionally, you can adjust the height of specific rows and the width of columns. For more info about rows refer to the Working with Rows and Columns section.

  • Names (Named Ranges): the Worksheet class exposes a Names property of type NameCollection that allows you to create, update and manage names. More about the feature is available in the Names article.

  • UsedCellRange and GetUsedCellRange(): Since each worksheet contains over a million rows and more than sixteen thousand columns, it is unlikely to use the full capacity of a worksheet. Typically, a worksheet uses only a part of the available cells. That said, in a number of scenarios you might want to know which part of the worksheet contains your data and ignore the rest of the cells. The UsedCellRange property of the Worksheet class returns a cell range that starts from cell A1 and holds all cells containing data or formatting. With the GetUsedCellRange() method you can pass and IEnumerable<IPropertyDefinition> object to get the used cell range, holding only the cells with specific property definitions. Example 1 demonstrates how to get the used cell range of cells with value.

    Example 1: Get the used cell range of cells with value

        CellRange result = worksheet.GetUsedCellRange(new IPropertyDefinition[] { CellPropertyDefinitions.ValueProperty }); 
    

    More information and examples of working with the used cell range of a worksheet are available in the Iterating Used Cells topic.

  • Collection of Hyperlinks: Each worksheet can contain numerous hyperlinks to web pages, particular cells in the workbook or email addresses. More information on the topic is available in the Hyperlink article.

  • Find and Replace: You can easily find and replace text and numbers in the content of a worksheet. For more information about the feature see the Find and Replace article.

  • Protection: You can restrict the user from modifying the content and structure of the worksheet. When a worksheet is protected the user can edit the contents only of the cells that were explicitly marked as unlocked. Additionally, you can choose what options will be available to the user when protection is enabled. More about the feature is available in the Worksheet Protection article.

*This documentation is neither affiliated with, nor authorized, sponsored, or approved by, Microsoft Corporation.

In this article