2.2.3.30 w2xyz

Menu Information

Worksheet: Convert to XYZ

Brief Information

Convert worksheet data to XYZ format

Additional Information

Minimum Origin Version Required: 8.0 SR3, updated in 8.5.1 SR0

Command Line Usage

1. w2xyz iw:=[book1]sheet1! format:=xcol xlabel:=row1 ycol:=1;

2. w2xyz format:=xcol xlabel:=param param:=P ycol:=1;

3. w2xyz -r 2 range:=rng format:=ycol ylabel:=sel1 xcol:=sel1 trim:=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
Convert Range range

Input

int

0
Convert Range

Option list:

  • wks:Entire Worksheet
    0 = Select the entire worksheet.
  • rng:Specified Ranges
    1 = Use the specified range.
Input Worksheet iw

Input

Worksheet

<active>
Specify the input worksheet that has the data to be converted.
Input irng

Input

Range

<active>
Specify the input range to be converted.
Data Format format

Input

int

2
Specify the format of the source data.

Option list:

  • xcol:X across columns
    The X values are across columns.
  • ycol:Y across columns
    The Y values are across columns.
  • noxy:No X and Y
    There is no X or Y values in the worksheet. The indices of columns and rows will be the output for X and Y values respectively.
X Values in xlabel

Input

int

0
Specify where the X values are. It is available when the Data Format is X across columns.

Option list:

  • none:None
    There are no X values in the worksheet. The indices of columns will be the X values.
  • row1:First Data Row
    The data in the first row will be the X values.
  • param:Column Label
    Use the column label row to specify the X values.
  • sel1:First Data Row in Selection
    Use the data row to specify the X values. Convert Range must be Specified Ranges and Data Format is X across columns or Y across columns.
Y Values in ylabel

Input

int

0
Specify where the Y values are. It is available when the Data Format is Y across columns.

Option list:

  • none:None
    There are no Y values in the worksheet. The indices of columns will be the Y values.
  • row1:First Data Row
    The data in the first row will be the Y values.
  • param:Column Label
    Use the column label row to specify the Y values.
  • sel1:First Data Row in Selection
    Use the data row to specify the Y values. Convert Range must be Specified Ranges and Data Format is X across columns or Y across columns.
Column Label param

Input

string

This is only available when Column Label is selected from X Values in or Y Values in. Specify the label row to use as the X or Y coordinates using its Label Row character. Please refer to Column Label Row Characters for the single character of each column label row.
X Values in First Column xcol

Input

int

0
Specify whether the X values are in the first column. It is available when the Data Format is Y across columns.
Y Values in First Column ycol

Input

int

0
Specify whether the Y values are in the first column. It is available when the Data Format is X across columns.
Trim Missing trim

Input

int

0
Determine whether to trim the missing rows or columns. If, in converting to XYZ any of the coordinates is missing, specifying this option will exclude the data point.
  • 0 = false
  • 1 = true
Output oz

Output

XYZRange

[<input>]<new>!(<new>,<new>,<new>)
Specify three columns for the output XYZ range. These three columns can be in different worksheets and workbooks.

See the syntax of Output Notations.

Description

This X-Function is used to convert matrix-like worksheet data (virtual matrix) into XYZ column form. X coordinates are usually arranged in the first row and Y coordinates in the first column, or vice versa. It does not require the X and Y coordinates to be evenly-spaced. If XY coordinates are not included, column and row index are used. Z values can be numeric or text (as wll as categorical data).

Examples

  1. The following source data has X coordinates in the first row and Y coordinates in the first column:

    W2xyz example source.png

    To convert into XYZ form, make above worksheet active and then select Worksheet: Convert to XYZ from the Origin menu or run w2xyz -d; in Command Window to open the dialog of the w2xyz X-Function.
  2. In Conversion Options branch of this dialog, choose X across columns in the Data Format drop-down list. Then select First Data Row in the X Values in drop-down list and check the check box behind Y Values in First Column.

    W2xyz example dialog.png

  3. Click the OK button to perform the conversion. You will get the following output worksheet.

    W2xyz example result.png

Related X-Functions

w2m, r2m, m2w