[]
Deletes a cell or a range of cells from the worksheet and shifts other cells to replace deleted cells.
void Delete(DeleteShiftDirection shiftDirection = DeleteShiftDirection.Auto)
Sub Delete(Optional shiftDirection As DeleteShiftDirection = DeleteShiftDirection.Auto)
| Type | Name | Description |
|---|---|---|
| DeleteShiftDirection | shiftDirection | Specifies which way to shift the cells. |
worksheet.Range["A1"].Value = "Delete me";
worksheet.Range["A2"].Value = "Keep me";
worksheet.Range["A1"].Delete();
object value = worksheet.Range["A1"].Value;