2.2.3.58 wrcopy

Brief Information

Copy a range of worksheet cells to another range

Additional Information

Minimum Origin Version Required: 8.0 SR5

Command Line Usage

  1. wrcopy iw:=[book1]sheet1! ow:=<new>;
  2. wrcopy iw:=[book1]sheet1! r1:=5 r2:=10 name:=12 ow:=<new>;

Variables

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

Input

Worksheet

<active>
Specify the source worksheet. In it, a range of cells, which is defined by c1, c2, r1 and r2 below, will be copied to the destination worksheet.
Output Worksheet ow

Output

Worksheet

<new>
Specify the destination worksheet.

See the syntax here.

Source Range Column Begin c1

Input

int

1
Specify the first column in the range to be copied.
Source Range Column End c2

Input

int

0
Specify the last column in the range to be copied.
Soruce Range Row Begin r1

Input

int

1
Specify the first row in the range to be copied.
Source Range Row End r2

Input

int

0
Specify the last row in the range to be copied.
Source Range Long Name Row name

Input

int

0
Specify a row in the source worksheet whose content will be used as long names for columns in the destination worksheet.
Destination Column Begin dc1

Input

int

1
Specify the first column in the range of the destination worksheet, to which the copied worksheet range will be pasted.
Destination Row Begin dr1

Input

int

1
Specify the first row in the range of the destination worksheet, to which the copied worksheet range will be pasted.
Copy Column Labels label

Input

string

0
Specify whether to copy the column labels. You can specify which labels will be copied by the column label row characters. For example, LUCP1D1, where L for Long name, U for Unit, C for Comments, P for Parameters and D for User defined parameters. Column label row characters for this X-Function was supported from Origin 8.1 SR3.
Two integers, 0 and 1 are also supported for compatibility reason. Where
0: No label will be copied
1: Copy all labels
Copy Column Format format

Input

int

0
Specify whether to copy the column format.
Transpose transpose

Input

int

0
Specify whether to transpose the copied range.

Description

This X-Function can be used to copy the range of cells in a worksheet to another. A row in the source worksheet can be used to set the long names of the columns in the destination worksheet.

Examples

The following script command is used to copy the cells range from second row to the end of Sheet1 in Book1 to a new worksheet named Copysheet in the same workbook. And it uses the first row of the source worksheet to set the Long Name of the columns in the destination worksheet. It copies the Units and Comments as well.

wrcopy iw:=[Book1]Sheet1! ow:=[Book1]"Copysheet"! r1:=2 name:=1 label:=UC;

Related X-Functions

colcopy, wcopy