Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Microsoft Excel is present?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463215
Message ID:
00466169
Vues:
15
This is a good trick Louis, thanks!

>>ANother trick
>>**********
>
>More trick
>
>
>*----------------------------------------------------
>* FUNCTION BuscaExcel
>*----------------------------------------------------
>* Busca si Excel está instalado
>* RETORNO: .T. Si Excel está instalado
>* USO: ? BuscaExcel
>*----------------------------------------------------
>FUNCTION BuscaExcel
>	LOCAL lcArchivo, lc, lcRutaExe, llRet
>
>	*--- Creo un archivo .xls
>	lcArchivo = SYS(5) + "\" + SYS(3) + ".xls"
>	STRTOFILE("*", lcArchivo, .T. )
>
>	lc = SPACE(0)
>	lcRutaExe = SPACE(128)
>	llRet = .F.
>
>	DECLARE INTEGER FindExecutable IN shell32 ;
>		STRING @lcArchivo, ;
>		STRING @lc, ;
>		STRING @lcRutaExe
>
>	*--- Busco el archivo asociado a .xls
>	IF FindExecutable(@lcArchivo, @lc, @lcRutaExe) > 32
>		IF "EXCEL.EXE" $ UPPER(lcRutaExe)
>			llRet = .T.
>		ENDIF
>	ENDIF
>	DELETE FILE (lcArchivo)
>	RETURN llRet
>ENDFUNC
>
>*----------------------------------------------------
>
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform