Description
ExcelWriter has three style types: CellStyle, GlobalStyle, and NamedStyle.
C#
vb.net
Remarks
All three types derive from the Style class, and NamedStyle
derives from GlobalStyle
.
You cannot create a CellStyle, only manipulate existing ones as part of the objects they apply to. To create a GlobalStyle
, use Workbook.CreateStyle(). To create a NamedStyle
, use Workbook.CreateNamedStyle(). To get a NamedStyle
from an existing document, use Workbook.GetNamedStyle().
Examples
C#
vb.net
Properties
Name |
Description |
---|---|
Sets or returns the background color for cells. | |
Returns a Border object for the style. | |
Sets or returns whether a cell will be locked in a protected worksheet. | |
Sets or returns the Font object that defines the font for this style. | |
Sets or returns a foreground color for cells. A foreground color is visible when a pattern is assigned to a cell. | |
Sets or returns whether formulas or their calculated results will be displayed in a protected worksheet. | |
Sets or returns the horizontal alignment of text within cells. | |
Sets or returns level of indentation of the contents within the cell. | |
Sets or returns the whether the text will be justfied horizontally, when the Horizontal Alignment is set to Distributed | |
Sets or returns the number format string used for formatting of numbers and dates. | |
Sets or returns the angle that text is displayed at, as a value between -90 and 90. | |
Sets or returns a Pattern applied to cells. | |
Sets or returns whether text in a cell should be reduced in size to fit within the cell's width. | |
Sets or returns the direction of the text with in the cells. | |
Sets or returns the vertical alignment of text within cells. | |
Sets or returns if text that is larger than the width of the cell will be wrapped, increasing the height of a cell. |
Nested Classes
Name |
Description |
---|---|
A ColumnInsertBehavior value determines what style will be applied to the inserted columns. | |
The HAlign class contains all horizontal alignment options. | |
A RowInsertBehavior value determines what style will be applied to the inserted rows. | |
The TextDirection class contains all text direction options. | |
The VAlign class contains all vertical alignment options. |