[]
Specifies the direction in which to move.
This enum corresponds to Excel's xlDirection constants and is used to indicate a movement direction such as up, down, left, or right.
public enum Direction
Public Enum Direction
Workbook workbook = new Workbook();
IWorksheet worksheet = workbook.ActiveSheet;
worksheet.Range["A1"].Value = "Start";
Direction direction = (Direction)Enum.ToObject(typeof(Direction), -4121);
string nextCell = direction == Direction.Down ? "A2" : "B1";
worksheet.Range[nextCell].Value = "Next";
object nextValue = worksheet.Range["A2"].Value;
| Name | Description |
|---|---|
| Down | Specifies the move direction is down. |
| ToLeft | Specifies the move direction is left. |
| ToRight | Specifies the move direction is right. |
| Up | Specifies the move direction is up. |