OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           
 

2.2.3.67 wtranspose

Menu Information

Worksheet: Transpose

Brief Information

Transpose the active worksheet

Additional Information

Minimum Origin Version Required: Origin 8 SR0, updated in Origin 8.5 SR0

Command Line Usage

1. wtranspose exchange:=1 col:=new type:=long;

2. wtranspose select:=1;

Variables

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

Input

Worksheet

<active>

Specify the worksheet to be transposed.

Transpose from Selected Cell select

Input

int

0

This is only available when the Exchange Label With Data check box is not selected. It specifies whether or not to transpose only a region of the worksheet, where the selected cell of the top-left corner of the region. When this check box is selected, the cells above or to the left or the selected cell will not be transposed. Otherwise, the whole worksheet will be transposed.

Exchange Label With Data exchange

Input

int

1

This is only available when the Transpose from Selected Cell check box is not selected. It specifies whether to exchange the column label row selected in the Label Type drop-down list with the data column selected in the Data drop-down list.

Label Type type

Input

int

invalid

This is only available when the Exchange Label With Data check box is selected. It specifies the column label row that will be exchanged with the data column selected in the Data drop-down list.
Option list

  • invalid:None
    No label rows will exchanged with a data column.
  • long: Long Name
    The Long Name label row.
  • unit:Units
    The Units label row.
  • comment:Comments
    The Comments label row.
  • rate:Sample Rate
    The Sample Rate label row.
  • para:Parameter
    The Parameter label row.
  • ud:User Define
    The first user-define parameter row label row.
  • all:All
    All the label rows.
Data col

Input

int

new

This is only available when the Exchange Label With Data check box is selected and the Label Type drop-down list is not None. It specifies the data column that will be exchanged with the column label row selected in the Label Type drop-down list.
Option list:

  • new Column
    Creates a new column to the leftmost of the worksheet with Y column designation and exchanges it with the selected column label row.
  • first Column
    Exchanges the first data column with the selected column label row with X column designation. The Label Type cannot be Sample Rate. Note: the leftmost cell of the column label row will be excluded in the exchange.
Output Worksheet ow

Output

Worksheet

<input>

Specify the destination for the transposed worksheet.

See the syntax here.

Description

This X-Function can be used to transpose worksheet data.

The whole worksheet can be transposed, or you can opt to transpose only part of the worksheet. In the latter case, select the worksheet cell that locates in the top-left corner of the part to be transposed before bringing up the dialog. Make sure the Transpose from Selected Cell checkbox is selected and click OK in the wtranspose dialog.

Note: A worksheet with columns of different types cannot be transposed.

Examples

Suppose you want to transpose the following worksheet and rearrange the content in the long name row as a new column:

Wtranspose wtranspose1.jpg

You can do the following:

  1. Make the worksheet active and select Worksheet: Transpose from the menu.
  2. Select Long Name with the Data Type drop-down list.
  3. Click OK to close the dialog.

The result worksheet is as follows:

Wtranspose wtranspose2.jpg

Related X-Functions

mtranspose

 

© OriginLab Corporation. All rights reserved.