Skip to main content
Version: Next

VP EXPORT TO BLOB

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

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
paramObjObject->Export options

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:

PropertyTypeDescription
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.
saveAsViewBooleanWhether to apply the format string to exporting value when saving, default=false.

The following parameters can be used in the callback method:

ParameterTypeDescription
param1textThe name of the 4D View Pro object
param24D.blobThe exported blob
param3objectA reference to the command's paramObj parameter
param4objectAn object returned by the method with a status message
.successbooleanTrue if export with success, False otherwise.
.errorCodeintegerError code.
.errorMessagetextError message.

Example

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

See also

VP IMPORT FROM BLOB