SetActiveSheetName method: PSSpreadsheet class

Syntax

SetActiveSheetName(sheetname)

Description

Use the SetActiveSheetName method to rename the active sheet within the Excel workbook file.

Parameters

Parameter Description

sheetname

Specifies the new name for the active sheet within the Excel workbook file.

Returns

(Optional) A Boolean value: True if the method completes successfully, False otherwise.

Example

The following example sets the name of the active sheet to Accounts.

&sheetname = "Accounts";
&ssObject.SetActiveSheetName(&sheetname);