ClearWorksheet macro was defined a long time ago, before set -em was implemented. We are not sure if there would be script out there that didn't want to fill with missing values after ClearWorksheet.
We are going to add a method(5471) into OC Worksheet class for SR1 that will do this cleanly in OC. This new method is going to be like this,
/**
Parameters:
nNumRows = number of rows in worksheet, use -1 to keep current settings
nNumCols = number of columns, use -1 to keep current settings
bClearData = decide if existing data in worksheet should be cleared. If True, then all data in worksheet is reset to missing values and each column is reset to upper index = 0, if FALSE, then no action is taken on both the data and the upper index on each column, and newly added columns will be in default state
Remarks:
If nNumCols is larger then the current number of columns in the worksheet, then new columns will be added using enumerated column names which is faster then calling AddCol
*/
BOOL SetSize(int nNumRows, int nNumCols, BOOL bClearData = FALSE);
so to do clear worksheet, can call SetSize(-1, -1). The current AddCol function is rather slow, so this new method will solve that problem as well.
CP