2.2.3.55 wmvsn

Brief Information

Reset short names for all columns in worksheet

Additional Information

Minimum Origin Version Required: 8.0 SR5

Command Line Usage

1. wmvsn w:=[Book1]sheet1! label:=no undo:=1

2. wmvsn w:=[Book1]sheet1! prefix:=abc undo:=1

3. wmvsn w:=[Book1]Sheet1! prefix:=A label:=ln undo:=1

Variables

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

Input/Output

Worksheet

<active>
Specify the worksheet to reset.
Short Name Prefix prefix

Input

string

Specify the prefix of the new short names. After this X-Function is run, the column short names are reset with this new prefix and enumeration.
Move To Label Row label

Input

int

0
Specify the column label row to which the original short names are moved.

Option list:

  • no:None
Do not move the original short names to any column label row.
  • ln:Long Name
The Long Name column label row.
  • u:Units
The Units column label row.
  • c:Comments
The Comments column label row.
  • p1:Parameters 1
The Parameters column label row.
  • p2:Parameters 2
The Parameters 2 column label row.
  • d1:User Parameter 1
The first user-defined parameter row.
  • d2:User Parameter 2
The second user-defined parameter row
Support Undo undo

Input

int

1
Specify whether to support undo. The default setting is 1.

Description

This X-Function can reset short names for all columns in worksheet. Moreover, it can move the original short names to other label rows, such as Long name, Units, Comments, Parameters, etc.

Please note that from version 2017, Origin will (re)name worksheet columns Short Name alphabetically according to column index, a similar column naming mechanism to Excel. You cannot change/edit column Short Names in this situation. To enable editing, uncheck Spreadsheet Cell Notation checkbox in the Properties tab of Window Properties dialog. You can then use X-Function wmvsn dialog to reset column Short Names in the worksheet.

Examples

Suppose you want to move the short names of all columns in a worksheet to the long name row and change the short names to "abc1", "abc2", etc... You can follow the steps below:

  1. Make this worksheet active.
  2. Enter
    wmvsn -d;
    in the Command Window and press Enter. This will bring up the Data Manipulation\Worksheet: wmvsn dialog box.
  3. The active worksheet is automatically picked up as the input worksheet.
  4. Enter abc after Short Name Prefix.
  5. Select Long Name with the Move To Label Row drop-down list.
  6. Click the Ok button.