Xceed Workbooks for .NET v1.4 Documentation
SplitRows Property
Example 


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > SheetView Class : SplitRows Property
Gets or sets the number of Rows after which a horizontal split will appear in the Worksheet. Creating a split will divide the SheetView in two; afterwards, both sides of the split can be scrolled independently.
Syntax
'Declaration

 

Public Property SplitRows As Integer
'Usage

 

Dim instance As SheetView

Dim value As Integer

 

instance.SplitRows = value

 

value = instance.SplitRows
public int SplitRows {get; set;}
Remarks

The value must be between 0 and 1048576. A value of 2, for example, would create a split at the bottom of the second Row. The default value is 0, which doesn't create a split.

Note that if the value of FrozenRows is greater than 0, this property will have no effect.

Example
Splits the worksheet horizontally after the 5th row and vertically after the first column:



using( var workbook = Workbook.Load( "test.xlsx" ) )

{

  // Splits horizontally after the first 5 rows and adds a Fill Background to them.

  worksheet.SheetView.SplitRows = 5;

  worksheet.Rows[ 0, 4 ].Style.Fill.BackgroundColor = System.Drawing.Color.Turquoise;



  // Splits vertically after the 1st column and adds a Fill Background to the first column.

  worksheet.SheetView.SplitColumns = 1;

  worksheet.Columns[ 0 ].Style.Fill.BackgroundColor = System.Drawing.Color.Tan;



  // Saves the workbook to disk.

  workbook.SaveAs( "SplitRowsColumns.xlsx" );

}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SheetView Class
SheetView Members