Skip to main content
A newer version of this page is available. .
Row

Worksheet Methods

A worksheet in a workbook.
Name Description
AddPrintRange(Range) Extends print range by merging with the specified range.
AutoOutline() Automatically creates an outline for the specified worksheet.
Calculate() Forces recalculation of the current worksheet.
Clear(Range) Removes cell content, formatting, hyperlinks and comments.
ClearComments(Range) Removes cell comments.
ClearContents(Range) Removes cell content.
ClearFormats(Range) Removes cell formatting.
ClearHyperlinks(Range) Removes cell hyperlinks.
ClearOutline() Clears the outline for the specified worksheet.
ClearPrintRange() Clears the print area in the current worksheet.
CopyFrom(Worksheet) Copies the specified worksheet into the current instance.
DeleteCells(Range, DeleteMode) Deletes cells from the worksheet.
DeleteCells(Range) Deletes cells from a worksheet, shifting other cells in the same row to the left.
FreezeColumns(Int32, Range) Freezes the specified number of columns to the right of the specified cell, including the column that contains this cell.
FreezeColumns(Int32) Freezes the specified number of columns on the left side of the worksheet.
FreezePanes(Int32, Int32, Range) Freezes the specified number of rows and columns below and to the right of the specified cell, including the row and column containing this cell.
FreezePanes(Int32, Int32) Freezes the specified number of rows and columns at the top and on the left side of the worksheet.
FreezeRows(Int32, Range) Freezes the specified number of rows below the specified cell, including the row that contains this cell.
FreezeRows(Int32) Freezes the specified number of rows at the top of the worksheet.
GetCellValue(Int32, Int32) Obtains the cell value for the specified cell. Inherited from ExternalWorksheet.
GetDataRange() Gets the worksheet range that encompasses all cells containing data and formulas.
GetExistingCells() Gets the existing cells in the worksheet.
GetPrintableRange() Returns a worksheet range that can be printed.
GetPrintableRange(Boolean) Calculates a worksheet range that can be printed with respect to the specified print area.
GetProtectionPermissions() Returns the permission set for a protected worksheet.
GetSelectedRanges() Returns cell ranges currently selected in the worksheet.
GetSelectedShapes() Returns shapes currently selected in the worksheet.
GetUsedRange() Returns the used range on the specified worksheet.
InsertCells(Range, InsertCellsMode) Inserts new cells in the worksheet.
InsertCells(Range) Inserts new cells in a worksheet, shifting other cells in the same column down.
MergeCells(Range, MergeCellsMode) Merges cells in the specified mode.
MergeCells(Range) Merges the specified cells.
Move(Int32) Moves the worksheet to another location within the workbook’s collection of worksheets.
MoveAfter(String) Moves the current sheet after the specified sheet in a workbook. Inherited from Sheet.
MoveBefore(String) Moves the current sheet before the specified sheet in a workbook. Inherited from Sheet.
MoveToBeginning() Moves the current sheet to the first position in a workbook. Inherited from Sheet.
MoveToEnd() Moves the current sheet to the last position in a workbook. Inherited from Sheet.
Print() Prints the current sheet using the default printer settings. Inherited from Sheet.
Print(PrinterSettings) Prints the current sheet using the specified printer settings. Inherited from Sheet.
Protect(String, WorksheetProtectionPermissions) Protects worksheet elements to prevent them from being changed by the user.
RemoveSubtotal(Range) Removes subtotals for the specified cell range.
ScrollTo(Range) Scrolls the worksheet to the top-left cell of the specified range.
ScrollTo(Int32, Int32) Scrolls the worksheet to the specified column and row.
ScrollToColumn(Int32) Scrolls the worksheet to the specified column.
ScrollToColumn(String) Scrolls the worksheet to the specified column.
ScrollToRow(Int32) Scrolls the worksheet to the specified row.
ScrollToRow(String) Scrolls the worksheet to the specified row.
Search(String, SearchOptions) Performs a search in the worksheet using specified options.
Search(String) Performs a search in the worksheet using the default parameters.
SetPrintRange(Range) Defines the print range.
SetSelectedRanges(IList<Range>, Boolean) Selects cell ranges in the worksheet and specifies whether the selection expands to fit merged cells.
SetSelectedRanges(IList<Range>) Sets cell ranges selected in the worksheet.
SetSelectedShapes(IList<Shape>) Sets shapes selected in the worksheet.
Sort(Range, Boolean) Sorts the specified range by the first column.
Sort(Range, IEnumerable<SortField>) Sorts the specified range by multiple columns.
Sort(Range, Int32, Boolean) Sorts the specified range by the specified column.
Sort(Range, Int32, IComparer<CellValue>) Sorts the specified range by the specified column using the specified comparer.
Sort(Range, Int32) Sorts the specified range by the specified column in ascending order.
Sort(Range) Sorts the specified range by the first column in ascending order.
Subtotal(Range, Int32, List<Int32>, Int32, String) Creates subtotals for the specified range of cells.
UnfreezePanes() Unfreezes rows and columns on the worksheet.
UnMergeCells(Range) Unmerges the specified cells that have been merged.
Unprotect(String) Removes protection from a worksheet.
See Also