Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending an array to a COM Property
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Sending an array to a COM Property
Divers
Thread ID:
00748206
Message ID:
00748206
Vues:
52
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform