Aller au contenu principal
Version: Next

VP EXPORT TO BLOB

VP EXPORT TO BLOB ( vpAreaName : Text ; paramObj : Object )

ParamètresTypeDescription
vpAreaNameText->Nom d'objet formulaire zone 4D View Pro
paramObjObject->Options d'export

Description

The VP EXPORT TO BLOB command exports the vpAreaName 4D View Pro document in a 4D.Blob according to the paramObj options. The exported blob is available through the export callback. Exporting and importing 4D View Pro areas as blobs is fast and memory-efficient.

In paramObj, you can pass several properties:

PropriétéTypeDescription
formula4D.Function(mandatory) Callback method to be launched when the export has completed. See Passing a callback method (formula).
includeAutoMergedCellsBooleanWhether to include the automatically merged cells when saving, default=false.
includeBindingSourceBooleanWhether to include the binding source when saving, default=true.
includeCalcModelCacheBooleanWhether to include the extra data of calculation. Can impact the speed of opening the file, default=false.
includeEmptyRegionCellsBooleanWhether to include any empty cells(cells with no data or only style) outside the used data range, default=true
includeFormulasBooleanWhether to include the formula when saving, default=true.
includeStylesBooleanWhether to include the style when saving, default=true.
includeUnusedNamesBooleanWhether to include the unused custom name when saving, default=true.

|saveAsView|Boolean|Whether to apply the format string to exporting value when saving, default=false.|

Les paramètres suivants peuvent être utilisés dans la méthode de rappel :

ParamètresTypeDescription
param1textNom de l'objet 4D View Pro
param24D.blobThe exported blob
param3objectA reference to the command's paramObj parameter
param4objectObjet retourné par la méthode avec un message de statut
.successbooleanVrai si l'export est réussi, Faux sinon.
.errorCodeintegerCode d'erreur.
.errorMessagetextMessage d'erreur.

Exemple

The command VP EXPORT TO BLOB is asynchronous. You must create a callback method (named VPBlobCallback in our example) to use the export results.

//Export the VP document
VP EXPORT TO BLOB("ViewProArea"; {formula: Formula(VPBlobCallback)})
//VPBlobCallback method
#DECLARE($area : Text; $data : 4D.Blob; $parameters : Object; $status : Object)
var $myEntity : cs.myTableEntity

If ($status.success)
// Save the document in a table
$myEntity:=ds.myTable.new()
$myEntity.blob:=$data
$myEntity.save()
End if

Voir également

VP IMPORT FROM BLOB