Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP to Excel
Message
De
28/02/2002 10:11:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
28/02/2002 10:09:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00626407
Message ID:
00626409
Vues:
9
>Sorry for the silly question, but could anyone help me with basic programatic access to Excel from VFP. i.e open Excel book and change some cells values.
>
>Thanks for that
>
>Jonathan

Use the following example as a starting point.
oExcel = CreateObject("Excel.Application")
oExcel.Visible = 1   && for debugging
oExcel.Workbooks.Add()
oSheet = oExcel.ActiveSheet
oSheet.Cells(1,1) = "Hello!"
Then, save a macro, do anything you want, and do some small adaptations from the generated macro code, to adapt to VFP.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform