Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is Excel?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00767689
Message ID:
00767702
Vues:
22
I think you can force it to look for Excel 2002 by using

o=createobject("excel.application.10")

".10" is the version number. Excel 2000 might have another version number, perhaps ".9"


>If you just want to know if Excel is Installed try with following code:
>
>
>*----------------------------------------------------
>* FUNCTION FindExcel
>* Busca si MS Excel está instalado en la PC
>*----------------------------------------------------
>* Located at: http://www.portalfox.com/article.php?sid=142
>FUNCTION FindExcel
>  LOCAL lcErrorAnt, loApp, CR
>  CR = CHR(13)
>  lcErrorAnt = ON("ERROR")
>  ON ERROR DO _MiError
>  loApp = CREATEOBJECT("Excel.Application")
>  IF VARTYPE(loApp) = "O"
>    MESSAGEBOX("Name: " + loApp.NAME + CR + ;
>      "Version: " + loApp.VERSION + CR + ;
>      "Build: " + TRANSFORM(loApp.BUILD), 64 )
>    RELEASE loApp
>  ELSE
>    MESSAGEBOX("Word not installed", 16)
>  ENDIF
>  ON ERROR &lcErrorAnt
>  RETURN
>ENDFUNC
>
>*----------------------------------------------------
>* PROCEDURE _MiError
>* Usado por BuscaWord y BuscaExcel
>*----------------------------------------------------
>PROCEDURE _MiError
>  RETURN
>ENDPROC
>
>
>If course is more than easy with VFP8 TRY ... CATCH
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform