NanoXLSX Library Documentation
![]() | WorkbookSetSelectedWorksheet Method (Int32) |
Sets the selected worksheet in the output workbook
Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 1.2.3.0 (1.2.3)

C#
public void SetSelectedWorksheet( int worksheetIndex )
Parameters
- worksheetIndex
- Type: SystemInt32
Zero-based worksheet index

Exception | Condition |
---|---|
RangeException | Throws a OutOfRangeException if the index of the worksheet is out of range |

This method does not set the current worksheet while design time. Use SetCurrentWorksheet instead for this
