New to Telerik Document ProcessingStart a free 30-day trial

Two-dimensional grid organizing cells into rows and columns with filtering, sorting, formulas, and styling. Use to manage worksheet content, properties, and layout within a workbook.

Definition

Methods

Copies Worksheet contents from a source Worksheet into this instance. This Worksheet instance contents are overridden from the source Worksheet contents.

C#
public void CopyFrom(Worksheet sourceWorksheet)
Parameters:sourceWorksheetWorksheet

The worksheet to copy from.

Creates a new WorksheetViewState instance initialized with default display settings.

C#
protected override ISheetViewState CreateViewState()
Returns:

ISheetViewState

A new worksheet view state.

Overrides: Sheet.CreateViewState()

Disposes the specified disposing.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

The disposing.

Overrides: Sheet.Dispose(bool)

Searches for the first occurrence of text in the worksheet matching the specified criteria and returns its location.

C#
public FindResult Find(FindOptions findOptions)
Parameters:findOptionsFindOptions

The find options.

Returns:

FindResult

The first matching result, or null if not found.

Searches for all occurrences of text in the worksheet matching the specified criteria and returns their locations.

C#
public IEnumerable<FindResult> FindAll(FindOptions findOptions)
Parameters:findOptionsFindOptions

The find options.

Returns:

IEnumerable<FindResult>

All matching results in the worksheet.

Gets the used cell range for specific cell property definitions.

C#
public CellRange GetUsedCellRange(IEnumerable<IPropertyDefinition> propertyDefinitions)
Parameters:propertyDefinitionsIEnumerable<IPropertyDefinition>

The cell property definitions from CellPropertyDefinitions

Returns:

CellRange

The used cell range for specific cell property definitions.

Gets the used cell range for a specific cell property definition.

C#
public CellRange GetUsedCellRange(IPropertyDefinition propertyDefinition)
Parameters:propertyDefinitionIPropertyDefinition

The cell property definition from CellPropertyDefinitions

Returns:

CellRange

The used cell range for specific cell property definitions.

Protects the worksheet.

C#
public void Protect(string password, WorksheetProtectionOptions options)
Parameters:passwordstring

The password.

optionsWorksheetProtectionOptions

The protection options of the worksheet.

Executes replace action according to the specified replace options.

C#
public bool Replace(ReplaceOptions replaceOptions)
Parameters:replaceOptionsReplaceOptions

The replace options.

Returns:

bool

The value indicating whether a value was found to replace.

Executes replace all action according to the specified replace options.

C#
public int ReplaceAll(ReplaceOptions replaceOptions)
Parameters:replaceOptionsReplaceOptions

The replace options.

Returns:

int

The number of replacements made.

Unprotects the worksheet.

C#
public bool Unprotect(string password)
Parameters:passwordstring

The password.

Returns:

bool

Properties

Provides access to the cell collection for reading and modifying cell content, formulas, and formatting.

C#
public Cells Cells { get; }
Property Value:

The cells of the worksheet.

Provides access to charts visualizing data from the worksheet or other sources.

C#
public ChartCollection Charts { get; }
Property Value:

The charts.

Provides access to the column collection for managing column widths, visibility, and column-level formatting.

C#
public Columns Columns { get; }
Property Value:

The columns of the worksheet.

Provides access to modern threaded comments attached to cells in the worksheet.

C#
public CommentCollection Comments { get; }
Property Value:

The comments.

Controls the default column width applied to columns without explicit width settings.

C#
public ColumnWidth DefaultColumnWidth { get; set; }
Property Value:

The default width of the column.

Controls the default row height applied to rows without explicit height settings.

C#
public RowHeight DefaultRowHeight { get; set; }
Property Value:

The default height of the row.

Provides access to the auto-filter configuration for hiding rows based on column criteria.

C#
public AutoFilter Filter { get; }
Property Value:

The filtering of the worksheet.

Provides access to row and column grouping settings for outlining and collapsing data sections.

C#
public GroupingProperties GroupingProperties { get; }
Property Value:

The grouping properties.

Controls how row and column headers are rendered, enabling custom labeling schemes beyond default A-Z and 1-N.

C#
public HeaderNameRenderingConverterBase HeaderNameRenderingConverter { get; set; }
Property Value:

The header name rendering converter.

Provides access to the collection of hyperlinks defined in the worksheet for navigation and external references.

C#
public HyperlinkCollection Hyperlinks { get; }
Property Value:

The hyperlinks.

Provides access to floating images positioned on the worksheet.

C#
public ImageCollection Images { get; }
Property Value:

The images.

Provides access to worksheet-scoped named ranges and constants that can be referenced in formulas.

C#
public NameCollection Names { get; }
Property Value:

The collection of defined names of the worksheet.

Provides access to cell notes (legacy comments) attached to cells in the worksheet.

C#
public NoteCollection Notes { get; }
Property Value:

The notes.

Controls which operations users can perform on a protected worksheet, such as inserting rows or formatting cells.

C#
public WorksheetProtectionOptions ProtectionOptions { get; }
Property Value:

The protection options.

Provides access to the row collection for managing row heights, visibility, and row-level formatting.

C#
public Rows Rows { get; }
Property Value:

The rows of the worksheet.

Returns the base page setup implementation for this sheet type.

C#
protected override sealed SheetPageSetupBase SheetPageSetup { get; }
Property Value:

The sheet page setup.

Overrides: Sheet.SheetPageSetup

Provides access to the current sort configuration applied to the worksheet data.

C#
public SortState SortState { get; }
Property Value:

The sort state.

Returns the sheet type identifier, always SheetType.Worksheet for worksheet instances.

C#
public override SheetType Type { get; }
Property Value:

The type of the sheet.

Overrides: Sheet.Type

Returns the bounding range encompassing all cells with content or formatting, indicating the worksheet's active data area.

C#
public CellRange UsedCellRange { get; }
Property Value:

The used cell range.

Provides access to display settings including zoom, frozen panes, selection, and gridline visibility.

C#
public WorksheetViewState ViewState { get; }
Property Value:

The view state of the worksheet.

Provides access to page layout settings for printing and PDF export, including margins, orientation, and paper size.

C#
public WorksheetPageSetup WorksheetPageSetup { get; }
Property Value:

The worksheet page setup.