Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending an array to a COM Property
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00748206
Message ID:
00748217
Views:
17
Thanks Sergey,

Thats what i figured, so now i need to convert this array into somekind of in memory structure and pass it to excel, do you know of any API calls i could use or any functions available to do this.

Or do you know the exact structure of the needed COM array. ?

>You cannot assign VFP array to a COM object property. The COMARRAY() function has efect only on arrays passed as parameters to a COM object methods.
>
>>I am tring the following code with excel, it should open a spreadsheet with 2 rows "1" and "2" but the 2 rows it creates are "1", it looks like VFP is only sending the first item of the array.
>>
>>How do should i send the array to the property Value so all items are sent?
>>
>>Thanks.
>>
>>LOCAL xlApp As Excel.Application
>>
>>DIMENSION x(2)
>>
>>x(1) = "1"
>>x(2) = "2"
>>
>>xlApp = CreateObject("Excel.Application")
>>xlWb = xlApp.Workbooks.Add
>>xlWs = xlWb.Worksheets("Sheet1")
>>xlApp.Visible = .T.
>>xlApp.UserControl = .T.
>>
>>=COMARRAY(xlApp, 1)
>>=COMARRAY(xlWs, 1)
>>
>>xlWs.Cells(2, 1).Resize(2, 1).Value = x
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform