[]
Specifies the direction to shift cells when inserting a cell or a range of cells into a worksheet.
Used with the Insert(InsertShiftDirection) method to control whether existing cells are shifted down or to the right to make room for the newly inserted cells.
public enum InsertShiftDirection
Public Enum InsertShiftDirection
worksheet.Range["A1:C3"].Value = new object[,] {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
worksheet.Range["B2"].Insert(InsertShiftDirection.Down);
worksheet.Range["C2"].Insert(InsertShiftDirection.Right);
| Name | Description |
|---|---|
| Auto | Specifies that the shift direction is decided based on the shape of the range. |
| Down | Specifies to shift cells down. |
| Right | Specifies to shift cells to the right. |