2.2.3.42 wclear


Contents

Menu Information

Worksheet: Clear Worksheet

Brief Information

Clear worksheet cells

Additional Information

Minimum Origin Version Required: Origin 2017

Note:
  1. Origin 8.x versions do not have the hidden option.
  2. From Origin 2017 the labels option is supported.
  3. From Origin 2026 the keep option is supported.

Command Line Usage

1. wclear reduce:=0; 2. wclear reduce:=0 op:=1 msg:=0 r1:=3; 3. wclear labels:=0 keep:=1 msg:=0;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Worksheet to clear w

Input/Output

Worksheet

<active>
Specify worksheet to be cleared.
Reduce Row Size reduce

Input

int

1
Specify whether (1) or not (0) to reduce the dataset sizes to 0 and number of rows to minimal for sheet size.
Clear Operations op

Input

int

1
Specify whether(1) or not(0) show missing as blank.
Warning Message Box msg

Input

int

1
Specify whether(1) or not(0) to pop-up a warning message.
Start Row Number r1

Input

int

1
Specify the start row number, from which to the end, the data will be cleared.
Reset Hidden Rows hidden

Input

int

1
Specify whether to keep (0) existing hidden rows or reset (1) to reveal all rows.
Labels to clear labels

Input

string

<none>
Specify whether to clear the label rows. If yes, specify which label rows would be clear. Option include:
  • <none>:
    Keep all label rows.
  • 0:
    Clear all label rows.
  • Column Label Row Characters:
    Clear the specified label rows. For example, set labels:=LU, then Long Name row and Units row would be cleared.
  • “!” + Column Label Row Characters:
    Clear all label rows except for the specified rows. For example, set label:=!LU, then except for Long Name row and Units row, the other label rows would be cleared.

Note:

You can check the Column Label Row Characters here.
Keep Formula and Links keep

Input

int

0
Specify whether(1) or not(0) to keep cell formulas and links.

Description

This function is used to clear the worksheet data from a specified row to the last row.