Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling Excel97 from VFP5
Message
De
08/07/1999 02:40:42
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
À
07/07/1999 13:05:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00238364
Message ID:
00238701
Vues:
11
>Try this out. I have done some extensive work with integration of VFP and office. Let me know if it works or not.
>
>loExcel = CreateObject('Excel.Application')
>loExcel.Workbooks.Add
>loBook = loExcel.ActiveWorkBook
>loSheet = loExcel.ActiveSheet
>loExcel.Visible = .T.
>
>* Populate My Sheet
>B = 1
>For A = 65 To 90
> lcA1 = "A" + ALLTRIM(STR(B))
> lc1A = CHR(A) + "1"
> loExcel.Range(lc1A).Value = A
> loExcel.Range(lcA1).Value = A
> B = B + 1
>NEXT
>
>
>* Select My Range
>loSheet.Range("A1:Z26").Select
>
>* Copy My Range
>loSheet.Range("A1:Z26").Copy
>
>* Paste My Range
>loExcel.Worksheets("Sheet3").Activate
>loSheet3 = loExcel.ActiveSheet
>loSheet3.Paste
>
>Thanks
>Darren

I've few questions related with excel & vfp...

1. Will this code work with Office 95 also ?? I'm transferring reports in excel but i want to keep my code portable so it can run in all versions..

2. How to chk, whether user has installed office or not ?? (any version), If installed, which is the version ??

3. What is the best way to transfer data to excel i.e.
(a) copy to xls command
(b) copying to clipboard & pasting it
(3) oXls(row,col).value = ????

pls advs....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform