Click or drag to resize

Worksheet SetDefaultRowStyle Method (Int32, Int32, CellStyle)

Sets default style for row.
Examples
The following code illustrates how to set the default style for rows:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create style</para><para>CellStyle style = workbook.Styles.Add("CustomStyle");</para><para>//Set Color</para><para>style.Color = Color.Red;</para><para>//Set default style</para><para>worksheet.SetDefaultRowStyle(2, 5, style);</para><para>//Save to file</para><para>workbook.SaveToFile("SetDefaultRowStyle.xlsx");</para>

Namespace: Spire.Xls
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public void SetDefaultRowStyle(
	int firstRowIndex,
	int lastRowIndex,
	CellStyle defaultStyle
)

Parameters

firstRowIndex
Type: System Int32
First row index.
lastRowIndex
Type: System Int32
Last row index.
defaultStyle
Type: Spire.Xls CellStyle
Default style.
See Also