|0||The line style of a border is none (no border visible).|
|1||The line style of a border is thin.|
|2||The line style of a border is medium.|
|3||The line style of a border is dashed.|
|4||The line style of a border is dotted.|
|5||The line style of a border is thick.|
|6||Obsolete. Obsolete. Useinstead.|
|6||The line style of a border is double line.|
|7||The line style of a border is hairline.|
|8||The line style of a border is medium dashed.|
|9||The line style of a border is dash-dot.|
|10||The line style of a border is medium dash-dot.|
|11||The line style of a border is dash-dot-dot.|
|12||The line style of a border is medium dash-dot-dot.|
The line style of a border is slant-dash-dot.
This option is currently not supported in PDF, XPS and image file formats and defaults to.
|13||Obsolete. Obsolete. Useinstead.|
Conceptually, cell formatting is divided into following groups:
Additional CellStyle properties not associated with any formatting group are:
Cell formatting group (Number, Alignment, Font, Border, Fill or Protection) (and its associated properties) is resolved from referenced workbook (master) style, unless cell formatting group or its associated property is modified.
Cell formatting is available for one or more cells through Style property which is available on ExcelCell and CellRange types. Cell formatting specified on ExcelColumn and ExcelRow types through Style property is simply propagated to cell formatting of its Cells.
For performance reasons, cell formatting on CellRange is resolved based just on its top-left cell formatting, except borders which are resolved based on corner cells depending on border side.
Setting cell formatting property on CellRange is propagated to each cell in a range.
If modifying multiple formatting properties of a CellRange, without preserving unmodified formatting properties, preferable way is to create new instance of CellStyle, make modifications on it, and assign it to Style property of that range.
GemBox.Spreadsheet internally takes care not to allocate unnecessary cells when formatting a range of cells (for example, when formatting all worksheet cells) and to cache formatting information of equally formatted cells, at the appropriate time, to reduce memory footprint.
Following code demonstrates border formatting:
// 'Border' formatting group cells["B22"].Value = "Borders.SetBorders(...)"; cells["C22"].Style.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Accent2), LineStyle.Thin);
' 'Border' formatting group cells("B22").Value = "Borders.SetBorders(...)" cells("C22").Style.Borders.SetBorders(MultipleBorders.All, SpreadsheetColor.FromName(ColorName.Accent2), LineStyle.Thin)