Class ExcelStyleAttribute
Styles a property's data cells when ExcelRecordLayout writes it; the header cell is left alone.
The style replaces any column or row style on those cells. Colors are 0xRRGGBB, -1 for unset.
[AttributeUsage(AttributeTargets.Property)]
public sealed class ExcelStyleAttribute : Attribute
- Inheritance
-
ExcelStyleAttribute
- Inherited Members
Properties
Bold
Gets or sets a value indicating whether the text is bold.
public bool Bold { get; set; }
Property Value
Border
Gets or sets the line style of all four border edges.
public ExcelBorderStyle Border { get; set; }
Property Value
BorderColor
Gets or sets the border color as 0xRRGGBB; -1 for automatic.
public int BorderColor { get; set; }
Property Value
FillColor
Gets or sets the solid fill color as 0xRRGGBB; -1 for no fill.
public int FillColor { get; set; }
Property Value
FontColor
Gets or sets the font color as 0xRRGGBB; -1 for the default color.
public int FontColor { get; set; }
Property Value
FontName
Gets or sets the font family name, or null for the default font.
public string? FontName { get; set; }
Property Value
FontSize
Gets or sets the font size in points; 0 for the default size.
public double FontSize { get; set; }
Property Value
HorizontalAlignment
Gets or sets the horizontal alignment.
public ExcelHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Indent
Gets or sets the indent level (0 to 15).
public int Indent { get; set; }
Property Value
Italic
Gets or sets a value indicating whether the text is italic.
public bool Italic { get; set; }
Property Value
NumberFormat
Gets or sets the number-format code, or null for the general format.
public string? NumberFormat { get; set; }
Property Value
Rotation
Gets or sets the text rotation; see Rotation.
public int Rotation { get; set; }
Property Value
Strikethrough
Gets or sets a value indicating whether the text is struck through.
public bool Strikethrough { get; set; }
Property Value
Underline
Gets or sets a value indicating whether the text is underlined.
public bool Underline { get; set; }
Property Value
VerticalAlignment
Gets or sets the vertical alignment.
public ExcelVerticalAlignment VerticalAlignment { get; set; }
Property Value
WrapText
Gets or sets a value indicating whether text wraps within the cell.
public bool WrapText { get; set; }
Property Value
Methods
ToCellStyle()
Converts the attribute's values to a CellStyle.
public CellStyle ToCellStyle()
Returns
- CellStyle
The style.
Exceptions
- ArgumentException
A value is out of range.