Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP/Excel Automation
Message
De
24/07/2001 12:49:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00534454
Message ID:
00534495
Vues:
16
>I haven't done this for awhile so I am at a loss as to how to implement a do while that would create the proper row increment into excel. If anyone could return a few lines a code it would be appreciated.
>
>B.

The following sample can help as a starting point, to insert data into Excel. The variables for the current row / column should be maintained in Visual FoxPro. It is much more convenient to refer to both columns and rows by number, rather than use references like "A1" (what is the next column after "AA"? Or after "AZ"? You probably know, but try to explain that to Excel!).
oExcel = CreateObject("Excel.Application")
oExcel.Visible = 1   && for debugging
oExcel.Workbooks.Add()
oSheet = oExcel.ActiveSheet
oSheet.Cells(1,1) = "Hello!"
For additional commands, save a macro in Excel, and look at the result, which can be copied with minor modifications to Excel.

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