Skip to main content
A newer version of this page is available.
All docs
V18.2
Row

RangeExtensions.Delete(Range) Method

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

Namespace: DevExpress.Spreadsheet

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

Declaration

public static void Delete(
    this Range range
)

Parameters

Name Type Description
range Range

A Range object specifying a cell range to be deleted.

Remarks

The Delete method is an extension method of the Range 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