CellBorders Class
Represents a single set of cell border formats (left, right, top, bottom and diagonal).
- Inheritance:
- System.
Object CellBorders
Remarks
Diagonal-up (Diagonal
Conceptually, cell formatting is divided into following groups:
- Number - indicates how to format and render the numeric value of a cell. Associated property is Number
Format . - Alignment - formatting information pertaining to text alignment in cells. Associated properties are Horizontal
Alignment , VerticalAlignment , Indent, Rotation, IsText , WrapVertical Text and ShrinkTo .Fit - Font - defines the properties for the used font. Associated property is Font.
- Border - expresses a single set of cell border formats (left, right, top, bottom and diagonal). Associated property is Borders.
- Fill - specifies fill formatting (pattern or gradient). Associated property is Fill
Pattern . - Protection - contains protection properties associated with the cell. Associated properties are Locked and Formula
Hidden .
Additional Cell
- Name - name of the referenced Style.
- Quote
Prefix - true to store numeric value of a cell as text; otherwise, false. - Is
Default - true if Name Style is default (Normal) and there are no additional modifications of cell formatting; otherwise, false.
Excel
Excel
Style can either be built-in or user-defined. Built-in style is accessible from Styles via Built
Cell formatting group (Number, Alignment, Font, Border, Fill or Protection) (and its associated properties) is resolved from Name 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 Excel
note
For performance reasons, cell formatting on Cell
Setting cell formatting property on Cell
To set Style to one or more cells, simply assign it to Style property.
tip
Preferable way to modify formatting property of multiple cells is to get Cell
If modifying multiple formatting properties of a Cell
GemBox.Spreadsheet internally takes care not to allocate unnecessary cells when formatting a range of cells (for example, when formatting Cells) and to cache formatting information of equally formatted cells, at the appropriate time, to reduce memory footprint.
Properties
Item[IndividualBorder]
Gets the Cell
Parameters
individualBorder
- Individual
Border
The individual border for which to get the color and line style.
Property Value
The Cell
Remarks
Diagonal-up (Diagonal
Conceptually, cell formatting is divided into following groups:
- Number - indicates how to format and render the numeric value of a cell. Associated property is Number
Format . - Alignment - formatting information pertaining to text alignment in cells. Associated properties are Horizontal
Alignment , VerticalAlignment , Indent, Rotation, IsText , WrapVertical Text and ShrinkTo .Fit - Font - defines the properties for the used font. Associated property is Font.
- Border - expresses a single set of cell border formats (left, right, top, bottom and diagonal). Associated property is Borders.
- Fill - specifies fill formatting (pattern or gradient). Associated property is Fill
Pattern . - Protection - contains protection properties associated with the cell. Associated properties are Locked and Formula
Hidden .
Additional Cell
- Name - name of the referenced Style.
- Quote
Prefix - true to store numeric value of a cell as text; otherwise, false. - Is
Default - true if Name Style is default (Normal) and there are no additional modifications of cell formatting; otherwise, false.
Excel
Excel
Style can either be built-in or user-defined. Built-in style is accessible from Styles via Built
Cell formatting group (Number, Alignment, Font, Border, Fill or Protection) (and its associated properties) is resolved from Name 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 Excel
note
For performance reasons, cell formatting on Cell
Setting cell formatting property on Cell
To set Style to one or more cells, simply assign it to Style property.
tip
Preferable way to modify formatting property of multiple cells is to get Cell
If modifying multiple formatting properties of a Cell
GemBox.Spreadsheet internally takes care not to allocate unnecessary cells when formatting a range of cells (for example, when formatting Cells) and to cache formatting information of equally formatted cells, at the appropriate time, to reduce memory footprint.
Methods
GetUnresolvedBorder(IndividualBorder)
Gets the unresolved (direct) Cell
Parameters
individualBorder
- Individual
Border
The individual border for which to get the color and line style.
Returns
The unresolved (direct) Cell
SetBorders(MultipleBorders, SpreadsheetColor, LineStyle)
Sets the color and line style for the specified multiple borders of a cell.
public void SetBorders(MultipleBorders multipleBorders, SpreadsheetColor lineColor, LineStyle lineStyle)
Parameters
multipleBorders
- Multiple
Borders
The multiple borders for which to set the color and line style.
lineColor
- Spreadsheet
Color
The border line color.
lineStyle
- Line
Style
The line style.
Remarks
Diagonal-up (Diagonal
Conceptually, cell formatting is divided into following groups:
- Number - indicates how to format and render the numeric value of a cell. Associated property is Number
Format . - Alignment - formatting information pertaining to text alignment in cells. Associated properties are Horizontal
Alignment , VerticalAlignment , Indent, Rotation, IsText , WrapVertical Text and ShrinkTo .Fit - Font - defines the properties for the used font. Associated property is Font.
- Border - expresses a single set of cell border formats (left, right, top, bottom and diagonal). Associated property is Borders.
- Fill - specifies fill formatting (pattern or gradient). Associated property is Fill
Pattern . - Protection - contains protection properties associated with the cell. Associated properties are Locked and Formula
Hidden .
Additional Cell
- Name - name of the referenced Style.
- Quote
Prefix - true to store numeric value of a cell as text; otherwise, false. - Is
Default - true if Name Style is default (Normal) and there are no additional modifications of cell formatting; otherwise, false.
Excel
Excel
Style can either be built-in or user-defined. Built-in style is accessible from Styles via Built
Cell formatting group (Number, Alignment, Font, Border, Fill or Protection) (and its associated properties) is resolved from Name 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 Excel
note
For performance reasons, cell formatting on Cell
Setting cell formatting property on Cell
To set Style to one or more cells, simply assign it to Style property.
tip
Preferable way to modify formatting property of multiple cells is to get Cell
If modifying multiple formatting properties of a Cell
GemBox.Spreadsheet internally takes care not to allocate unnecessary cells when formatting a range of cells (for example, when formatting Cells) and to cache formatting information of equally formatted cells, at the appropriate time, to reduce memory footprint.
ToString()
Returns a System.
Returns
- System.
String
A System.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).