ExcelConditionalFormat

Ecng.Excel

Describes the visual format a conditional-formatting rule applies when its condition is true. Every member is optional: a value (or None for Border) leaves that aspect untouched, so only the attributes you set are written into the rule's differential format. Used by ExcelConditionalFormat).

プロパティ

BackgroundColor
public string BackgroundColor { get; set; }
value = excelConditionalFormat.BackgroundColor
excelConditionalFormat.BackgroundColor = value

Background fill color (hex code or name). For a solid fill this is the fill colour; for a pattern it is the colour behind the pattern.

Bold
public bool? Bold { get; set; }
value = excelConditionalFormat.Bold
excelConditionalFormat.Bold = value

Bold font. forces on, forces off, leaves unchanged.

Border
public ExcelBorderStyle Border { get; set; }
value = excelConditionalFormat.Border
excelConditionalFormat.Border = value

Border line style applied to all four sides. None (the default) writes no border.

BorderColor
public string BorderColor { get; set; }
value = excelConditionalFormat.BorderColor
excelConditionalFormat.BorderColor = value

Border color (hex code or name). Defaults to black when Border is set and this is empty.

FillPattern
public ExcelFillPattern FillPattern { get; set; }
value = excelConditionalFormat.FillPattern
excelConditionalFormat.FillPattern = value

Fill pattern. Defaults to Solid (a single-colour fill).

FontColor
public string FontColor { get; set; }
value = excelConditionalFormat.FontColor
excelConditionalFormat.FontColor = value

Font (text) color (hex code or name).

FontName
public string FontName { get; set; }
value = excelConditionalFormat.FontName
excelConditionalFormat.FontName = value

Font family name (e.g. "Calibri"). leaves unchanged.

FontSize
public double? FontSize { get; set; }
value = excelConditionalFormat.FontSize
excelConditionalFormat.FontSize = value

Font size in points. leaves unchanged.

Italic
public bool? Italic { get; set; }
value = excelConditionalFormat.Italic
excelConditionalFormat.Italic = value

Italic font. forces on, forces off, leaves unchanged.

NumberFormat
public string NumberFormat { get; set; }
value = excelConditionalFormat.NumberFormat
excelConditionalFormat.NumberFormat = value

Excel number format code (e.g. 0.00%, #,##0.00, "$"#,##0). leaves the cell's number format unchanged.

PatternColor
public string PatternColor { get; set; }
value = excelConditionalFormat.PatternColor
excelConditionalFormat.PatternColor = value

Pattern (lines/dots) colour for a non-solid FillPattern (hex code or name). Defaults to black when a pattern is set and this is empty. Ignored for Solid.

Strikethrough
public bool? Strikethrough { get; set; }
value = excelConditionalFormat.Strikethrough
excelConditionalFormat.Strikethrough = value

Strikethrough. forces on, forces off, leaves unchanged.

Underline
public bool? Underline { get; set; }
value = excelConditionalFormat.Underline
excelConditionalFormat.Underline = value

Single underline. forces on, forces off, leaves unchanged.