sisi231
Messages postés207Date d'inscriptionmercredi 5 mars 2003StatutMembreDernière intervention29 mars 2013
-
27 avril 2007 à 14:52
cs_Loda
Messages postés814Date d'inscriptionvendredi 3 novembre 2000StatutMembreDernière intervention30 juillet 2009
-
27 avril 2007 à 16:02
Je voudrais pouvoir déterminer par programmation si Excel est installé sur la machine cible de mon application.
cs_Loda
Messages postés814Date d'inscriptionvendredi 3 novembre 2000StatutMembreDernière intervention30 juillet 20093 27 avril 2007 à 16:02
salut,
moi j'ai fait comme ça:
// ############## OLE ###################
{Explaination :
Look like the create work, even when we don't have excel on the os.
but it's raise on the first call. }
ExcelApplication1:= TExcelApplication.create(nil);
fExcelPresentOnThisOS := true;
try
//# Check if excel is already open: // (tmp solution, we can do better)
// if no WorkBook are open, it's mean we start ourself excel
// (or that the user won't mind if we close it)
fExcelWasOpen := ExcelApplication1.Workbooks.Count > 0;
// will raise if no excel present.
except
on E: EOleSysError do begin
fExcelPresentOnThisOS := false;