Click or drag to resize

IXLSRange Style Property

Returns a Style object that represents the style of the specified range. Read/write IStyle.
Examples
The following code illustrates how to the style of the specified range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>//Add and set style</para><para>CellStyle style = workbook.Styles.Add("BorderStyle");</para><para>style.Color = Color.Red;</para><para>worksheet["C2"].Style = style;</para><para>//Save to file</para><para>workbook.SaveToFile("Style.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
IStyle Style { get; set; }

Property Value

Type: IStyle
See Also