variant.arrcreate
Creating the SafeArray array. This method creates the SafeArray array in the variable of the VARIANT type. VARIANT is an element of the array. Values can be assigned to the array elements using the variant.arrfromg method. An element of the array can be obtained with the help of the variant.arrgetptr method.
The example uses SafeArray
VARIANT v
//An array with 3 lines and 2 columns is being created
v.arrcreate( %{3,0,2,0} )
v.arrfromg( %{0,0, 0.1234f} )
v.arrfromg( %{0,1, int(100)} )
v.arrfromg( %{2,1, "Test" } )
...
//The array is being transmitted to the COM object
excapp~Range( excapp~Cells( 1, 1 ), excapp~Cells( 3, 2 ) ) = v
SafeArray allows you to group data, that makes data exchange with the COM object faster.
collection bounds
)
Parameters
bounds | The collection that contains array parameters. Two numbers are specified for each array dimension: the first number - an element quantity, the second number - a sequence number of the first element in the dimension. |
Return value
If the function succeeds, the return value is 1. If the function fails, the return value is 0.
Related links | Source |