Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OCX - function GetArray
#1
How can I use this function?

word GetArray(ColLeft RowTop VARIANT'VarArray)



Syntax

C++

BOOL CSpreadSheet::GetArray(long ColLeft, long RowTop, const VARIANT& VarArray);


Visual Basic

fpSpread.GetArray(ByVal ColLeft As Long, ByVal RowTop As Long, ByVal VarArray As Variant) As Boolean

Parameters
The following parameters are available:

Parameter Description
ColLeft Specifies the column of the first cell to read into the array
RowTop Specifies the row of the first cell to read into the array
VarArray Array to contain the data returned from the sheet
The array specification is zero-based.

I tried:

ARRAY(VARIANT) aa
sc3.GetArray(1 1 aa)

but doesn't work.
#2
ARRAY can be inside VARIANT. Try this

VARIANT v
sc3.GetArray(1 1 v)
ARRAY(VARIANT) aa ;;note: I don't know whether it should be VARIANT or other type
aa=v
#3
out aa[1 1]

[...]

Error (RT) in ejemplo_farpointgrid: array is not created

The ocx is http://www.clubfarpoint.com/FarPointSup ... ode=spread
#4
What is in v?

Macro
Code:
Copy      Help
out "0x%X %i" v.vt v.parray
#5
0x0 0
#6
Maybe before you have to allocate the array.

ARRAY(VARIANT) aa.create(3 3) ;;note: I don't know whether it should be VARIANT or other type
VARIANT v=aa
sc3.GetArray(1 1 v)
aa=v
#7
it works!

Thank you


Forum Jump:


Users browsing this thread: 1 Guest(s)