DeleteSheet method: PSSpreadsheet class

Syntax

DeleteSheet(sheetname)

Description

Use the DeleteSheet method to delete the specified sheet within an open Excel workbook.

Parameters

Parameter Description

sheetname

Specifies a String value representing the name of the sheet to be deleted.

Returns

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

Example

The following example deletes the Addresses sheet.

&sheetname = "Addresses";
&ssObject.DeleteSheet(&sheetname);