2.2.3.29 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;

Variables

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

Input

Worksheet

<active>
Specify the input worksheet that has the data 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.
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.
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.
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 (with X and Y coordinates in the first row and the first column) into XYZ column form. It does not require the X and Y coordinates to be evenly-spaced.

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