Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Office Excel.2007 won't automate
Message
De
31/10/2020 20:23:53
 
 
À
31/10/2020 11:01:10
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01676837
Message ID:
01676907
Vues:
26
reinstall worked thank you

If the createobject line errors out, a variation of Al's idea probable - multiple versions of Excel or remains thereof in registry.

The other gotcha for heavy COM objects is sometimes internal state of loading object, esp. true in IE/WebBrowser. This should only happen AFTER createobject(), if that is the case, throwing in Doevents or Wait Window Timeout xxx should help.

Band aid/ugly patch would be to persist last run of Excel and if needed run it via run/! before automating it. GetObject() to such an instance reads well in documentation, but has problems as well - createobject() most f the time better even if running instance is guaranteed.

HTH
thomas

>Office Excel.2007 won't automate unless it has run once.
>
>m.loExcel = CreateObject("Excel.Application")
>Error Ole error code 0x80080005: Server execution failed.
>With (m.loExcel)
> * do neat excel stuff here
>Endwith && excel
Barry Taft
i am only worried in the short term. once there is a problem, the solution usually presents itself.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform