Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get path from system registry to run Excel
Message
De
13/08/1998 10:25:55
 
 
À
13/08/1998 09:12:44
Dianne Bekritsky
Integrated Systems & Services
Little Falls, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00126459
Message ID:
00126509
Vues:
22
>I'd like to retrieve the path name for where Excel lives on all computer on which my app runs. I plan to run (/n) excel from VFP but the path might change from PC to PC. How do I pass the parameters to the CREGISTRY object?

A wrapper class already exists to access Excel. It is done via OLE so you don't need to know where it is, since the PC will know.

What you should do is subclass cOleBaseExcel. In your class create the methods you will need to preform things with excel. The reason to create a wrapper is so that if excel is changed, or you want to add functionality to your wrapper method, you only have to modify the wrapper class.

Once you have the class created you only need to do...

oExcel = createobj('aExcelClass','aOleLib') &&aOldLib would be the vcx

No you have an object reference to your wrapper class. When you do this the wrapper creates a wrapper to Excel.

There really isn't any doc in the MM manual about this, so you will have to look in the Codebook 3 book for some guidance.

Have fun,

Bob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform