IXlSheet.SplitPosition Property
Freezes a specific number of rows and columns above and to the left of the specified cell.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v24.2.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
XlCellPosition SplitPosition { get; set; }
#Property Value
Type | Description |
---|---|
Xl |
An Xl |
#Remarks
Use the SplitPosition property to lock panes at the top and on the left side of the worksheet to keep the specified rows and columns visible when the remaining area of the worksheet is scrolled.
The example below demonstrates how to freeze the first two rows and columns “A”, “B” and “C” in a worksheet. To do this, set the SplitPosition property to an XlCellPosition instance that specifies a cell located at the intersection of the fourth column (whose zero-based index is 3) and the third row (with the index 2).
Important
If you create an XLSX document, specify the Split
// Create a new worksheet.
using(IXlSheet sheet = document.CreateSheet())
{
// Freeze visible rows and columns above and to the left of the cell D3.
sheet.SplitPosition = new XlCellPosition(3, 2);
}
The image below shows the result.