Skip to main content
Row

RangeExtensions.Delete(CellRange) Method

Deletes the cell range from the worksheet, shifting other cells in the same row to the left.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public static void Delete(
    this CellRange range
)

Parameters

Name Type Description
range CellRange

A CellRange object specifying a cell range to be deleted.

Remarks

The Delete method is an extension method of the CellRange object that is called by using the instance method syntax.

To delete only cell content or formatting without removing entire cells from the worksheet, use the RangeExtensions.ClearContents, RangeExtensions.ClearFormats, RangeExtensions.ClearHyperlinks, RangeExtensions.ClearComments or RangeExtensions.Clear extension method of the range. To insert new cells, call the RangeExtensions.Insert method.

Another way to insert, delete and clear cells in the worksheet is to use the worksheet’s Worksheet.InsertCells, Worksheet.DeleteCells and Clear* methods (see the How to: Delete a Cell or Range of Cells, How to: Insert a Cell or Cell Range and How to: Clear Cells of Content, Formatting, Hyperlinks and Comments examples).

See Also