Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending an array to a COM Property
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Sending an array to a COM Property
Miscellaneous
Thread ID:
00748206
Message ID:
00748206
Views:
51
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
Next
Reply
Map
View

Click here to load this message in the networking platform