Aller au contenu principal
Version: Next

VP Copy to object

Historique
ReleaseModifications
19 R4Ajout

VP Copy to object ( rangeObj : Object {; options : Object} ) : Object

ParamètresTypeDescription
rangeObjObject->Objet plage
optionsObject->Options supplémentaires
RésultatObject<-Objet retourné. Contient les données copiées

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:

PropriétéTypeDescription
copyBooleanTrue (default) to keep the copied values, formatting and formulas after the command executes. False to remove them.
copyOptionsLongintSpécifie ce qui est copié ou déplacé. Possible values:

ValueDescription
vk clipboard options all (default)Copies all data objects, including values, formatting, and formulas.
vk clipboard options formattingCopies only the formatting.
vk clipboard options formulasCopies only the formulas.
vk clipboard options formulas and formattingCopies the formulas and formatting.
vk clipboard options valuesCopies only the values.
vk clipboard options value and formattingCopies the values and formatting.

The paste options defined in the workbook options are taken into account.

La commande retourne un objet qui contient les données copiées.

Exemple

Cet exemple de code copie d'abord le contenu, valeurs, formats et formules d'une plage dans un objet puis les colle dans une autre plage :

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)

Voir également

VP PASTE FROM OBJECT
VP MOVE CELLS
VP Get workbook options
VP SET WORKBOOK OPTIONS