DIAdem Help

Method: RemoveAll for Worksheets

  • Updated2024-09-12
  • 1 minute(s) read

Method: RemoveAll for Worksheets

Deletes all worksheets of an Excel workbook.

Object.RemoveAll
ObjectWorksheets
Object with this method

The following example creates an Excel workbook, deletes all the worksheets, and creates a new worksheet named Data. Refer to the help page Worksheets for detailed examples:

VBScriptPython

 

Dim oMyWorkbook, oMyWorkSheet
Set oMyWorkbook = CreateExcelWorkbook()
Call  oMyWorkbook.Worksheets.RemoveAll
Set oMyWorkSheet = oMyWorkbook.Worksheets.Add("Data")