Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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