Skip to main content
Row

RangeExtensions.ClearHyperlinks(CellRange) Method

Removes cell hyperlinks.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public static void ClearHyperlinks(
    this CellRange range
)

Parameters

Name Type Description
range CellRange

A CellRange object specifying the cell range to clear.

Remarks

The ClearHyperlinks method removes all active hyperlinks from the cell range. Cell content and formatting remain unchanged. This is an extension method of the CellRange object that is called by using the instance method syntax.

Another way to delete hyperlinks from cells is use the HyperlinkCollection.Remove or HyperlinkCollection.RemoveAt method of the Worksheet.Hyperlinks collection. Note that these methods leave hyperlink text in a cell, but remove cell formatting.

To separately remove cell content, formatting, comments or clear a cell range completely, call the RangeExtensions.ClearContents, RangeExtensions.ClearFormats, RangeExtensions.ClearComments or RangeExtensions.Clear method, respectively. To delete entire cells from the worksheet, use the RangeExtensions.Delete method.

To clear cells, you can also use the Clear* methods of the Worksheet object (see the How to: Clear Cells of Content, Formatting, Hyperlinks and Comments example).

See Also