3.6.4.7 ClearWorksheet (macro)

Clears the active worksheet or matrixsheet of a specified window and sets the number of rows to 30.

Definition:

def clearworksheet
{
win -o %1 (work -clr)
}

Example:

This macro takes one argument, the workbook name containing the sheet to be cleared. The macro should be called with the following syntax:

clearworksheet windowname

The script below clears the Sheet2 worksheet in Book3.

Book3!page.active$ = Sheet2; // The sheet to be cleared must be active
ClearWorksheet Book3; // The window need not be active

The wclear X-Function does not have active window or sheet requirements.