4.2.2 Copying and Pasting Worksheet Data
Origin provides several options to copy worksheet data from the source worksheet column(s) and paste them to another worksheet.
Copy and paste worksheet values with the context menus
Copy worksheet values
Select worksheet column(s), right click, select Copy and choose from the following:
||copy data with the display precision
|Copy (full precision)
||copy data with the full precision
|Copy (including label rows)
||copy both the labels and data(with display precision) of the source column(s)
||copy the formula of the source column(s) only
|Copy (label rows)
||copy the label rows of the source column(s) only
|Copy (formula and label rows)
||copy the formula and label rows only
||copy formula, labels and data(with full precision) of the source column(s)
For more information, see FAQ-482: How do I copy data with maximum precision?.
Copying and pasting of multiple worksheet cells was changed slightly for Origin 2019b, to be more MS Excel-like: Copying one cell and pasting to m cells, fills m cells. Further, copying n cells and pasting to n*m cells, fills all cells by repeating the copied sequence of n cells. The LabTalk system variable @CPNB was added to switch between old and new behaviors. For information on changing the value of a system variable, see this FAQ.
Paste Worksheet values
If you have copy some worksheet values, Origin provides several options to paste worksheet cell(s) to a new destination.
Select the first cell of the paste destination, right click on it and choose one of the following menu item depending on different purposes.
||paste the copied worksheet cell value(s) to the the destination
||transpose the copied cells block while pasting
||paste the copied cell value(s) as link(s), in which changes in the source cell(s) will trigger auto-update in the destination.
|Paste Link Transpose
||paste the copied cell value(s) as link(s) and transpose the cell block while pasting
If you only copied one cell, you can paste that cell as link to multiple cells by select Edit: Paste Link.
If edit a linked worksheet cell, you'll notice the notation that is used. For example, cell://A means this cell is linking to the 6th cell of col(A). Any value change in cell A will trigger updates in all cells that have cell://A automatically.
Since Origin 2019, if you have masked any data points in current dataset, copying and pasting the dataset will keep the masking status on these points. Please note, this copying with mask won't support "Paste Transpose", "Paste Link" and "Paste Link Transpose".
You can use the system variable @CPM to switch back to copying data without keeping the mask status.
Copy worksheet values by X-Functions
Besides the straightforward copy methods mentioned above, there are some powerful and flexible X-Functions can help you to copy and paste the worksheet values to another worksheet.
Copy worksheet columns by the X-Function "colcopy"
There is a X-Funtion called colcopy. It allows you to copy column data format or labels, or whether nor not to copy the hidden rows when a filter is applied to the source column.
To open the colcopy dialog, select Worksheet:Copy Columns to... from the main menu,
Right click on a column and select Copy Columns to... from the shortcut menu.
If a filter is applied, the right-click Copy menu ignores the hidden rows by default. To change this default behavior to copy all rows, set system variable @iHR=1. Refer to System Variable list for more details.
Copy worksheet cells by the X-Function "Wcopy" or "Wrcopy"
Besides the X-Function colcopy instructed above, Origin have another two X-Function, Wcopy and Wrcopy], to help user to copy data in worksheet cells(especially selected data rows or a specified block of cells) and paste to a new or an existing worksheet.
The X-Function Wcopy can be used to copy specified worksheet rows to a specified worksheet.
- Copy all rows to another worksheet.
- Pre-select some worksheet rows and then copy them only to a worksheet.
- Copy random rows by specified count or rate
- Specify how to present the output worksheet
- Specify whether to keep the output operations including the column formula.
The X-Function Wrcopy can be used to copy a arbitrary range of worksheet cells to another worksheet. You can also specify the destination location of copied range in the output worksheet.