2.2.3.58 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
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
|
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:
- Do not move the original short names to any column label row.
- The Long Name column label row.
- The Units column label row.
- The Comments column label row.
- The Parameters column label row.
- The Parameters 2 column label row.
- The first user-defined parameter row.
- 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:
- Make this worksheet active.
- Enter
wmvsn -d; in the Command Window and press Enter. This will bring up the Data Manipulation\Worksheet: wmvsn dialog box.
- The active worksheet is automatically picked up as the input worksheet.
- Enter abc after Short Name Prefix.
- Select Long Name with the Move To Label Row drop-down list.
- Click the Ok button.
|