Defines the cell's left, top, right, and bottom, border types.
public enum BorderType
Value | Name | Description |
---|---|---|
0 | Left |
Refers to the left border of a cell. |
1 | Top |
Refers to the top border of a cell. |
2 | Right |
Refers to the right border of a cell. |
3 | Bottom |
Refers to the bottom border of a cell. |
The BorderType enumeration is often used in conjunction with BorderStyle to not only define where the border is placed but also its style.
Being able to individually specify borders is particularly useful for creating grid layouts, emphasizing certain cells, or for aesthetic purposes in a worksheet.
It is important to note that individual border types can be combined. For instance, applying both Top
and Bottom
borders to a cell without affecting the Left
and Right
borders.