Select-SLWorkSheet


Synopsis

Select a worksheet from a workbook for editing.

Syntax

Description

Select a worksheet from a workbook for editing.
When a workbook contains multiple worksheets it is important that you use select-slworksheet to
select the required worksheet if not more often than not you might find that the worksheet
you made changes to is not the one you wanted.

Parameters

-WorkBookInstance

Instance of an excel document that can be used for editing.

Required? True
Position? 1
Default value  
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-WorksheetName

The worksheet that needs to be selected and made active for editing.

Required? True
Position? 0
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-NoPassThru

Retunrs a boolean based on whether the given worksheet was selected or not.Does not pass the workbookinstance through the pipeline.
By default the workbookinstance is passed through the pipeline so that other commands can work with it.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

String

SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

&;39;MyFirstDoc&;39; contains more than 4 worksheets.By default sheet5 which is the last worksheet is active.
We use select-slworksheet to select sheet2 and make it active.

Related links