RangeExtensions.Clear(CellRange) Method
Removes cell content, formatting, hyperlinks and comments.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
range | CellRange | A CellRange object specifying the cell range to clear. |
Remarks
The Clear method empties cells and clears all formatting. You can separately remove cell content, formatting, hyperlinks or comments using the RangeExtensions.ClearContents, RangeExtensions.ClearFormats, RangeExtensions.ClearHyperlinks or RangeExtensions.ClearComments method, respectively. To delete entire cells from the worksheet, use the RangeExtensions.Delete method.
Methods of the RangeExtensions class are accessible as methods of the CellRange object and called by using the instance method syntax.
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).