VP Copy to object
History
Release | Changes |
---|---|
19 R4 | Added |
VP Copy to object ( rangeObj : Object {; options : Object} ) : Object
Parameter | Type | Description | |
---|---|---|---|
rangeObj | Object | -> | Range object |
options | Object | -> | Additional options |
Result | Object | <- | Object returned. Contains the copied data |
Description
The VP Copy to object
command copies the contents, style and formulas from rangeObj to an object.
In rangeObj, pass the cell range with the values, formatting, and formulas to copy. If rangeObj is a combined range, only the first one is used.
You can pass an optional options parameter with the following properties:
Property | Type | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
copy | Boolean | True (default) to keep the copied values, formatting and formulas after the command executes. False to remove them. | ||||||||||||||
copyOptions | Integer | Specifies what is copied or moved. Possible values:
|
The paste options defined in the workbook options are taken into account.
The command returns an object that contains the copied data.
Example
This code sample first stores the contents, values, formatting and formulas from a range to an object, and then pastes them in another range:
var $originRange; $targetRange; $dataObject; $options : Object
$originRange:=VP Cells("ViewProArea"; 0; 0; 2; 5)
$options:=New object
$options.copy:=True
$options.copyOptions:=vk clipboard options all
$dataObject:=VP Copy to object($originRange; $options)
$targetRange:=VP Cell("ViewProArea"; 4; 0)
VP PASTE FROM OBJECT($targetRange; $dataObject; vk clipboard options all)
See also
VP PASTE FROM OBJECT
VP MOVE CELLS
VP Get workbook options
VP SET WORKBOOK OPTIONS