Reset short names for all columns in worksheet
Minimum Origin Version Required: 8.0 SR5
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
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Worksheet | w |
Input/Output Worksheet |
|
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 |
|
Specify the column label row to which the original short names are moved.
Option list:
|
Support Undo | undo |
Input int |
|
Specify whether to support undo. The default setting is 1. |
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.
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:
wmvsn -d;
in the Command Window and press Enter. This will bring up the Data Manipulation\Worksheet: wmvsn dialog box.