Method FreezePanes
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
FreezePanes(int, int)
Freezes rows at the top and columns at the left of the sheet, as Excel's Freeze Panes does (FrozenRows, FrozenColumns).
public void FreezePanes(int rows, int columns)
Parameters
rowsintHow many rows stay at the top; 0 for none.
columnsintHow many columns stay at the left; 0 for none.
Remarks
Written as Excel writes a frozen pane (measured): pane with xSplit, ySplit, the first cell
that scrolls and the pane that is active, and a selection in each pane. 0 and 0 unfreezes.
Exceptions
- ArgumentOutOfRangeException
A count is negative, or leaves no row or column to scroll.
- InvalidOperationException
The sheet is not a worksheet.
- InvalidDocumentException
The sheet's part is malformed.