Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reporting using Excel, Excel remains open
Message
 
À
13/03/2003 23:45:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00765514
Message ID:
00765789
Vues:
38
>>>>Just want to add to your discussion that even doing plain:
>>>>*----------------
>>>>objexcel=createobject("excel.application")
>>>>objexcel.quit
>>>>*---------
>>>>may be not enough to make Excel go away.
>>>>
>>>>If you enter those two lines manually from command VFP window, what happens?
>>>>
>>>
>>>It leaves memory just fine. Now actually do something with your Excel object and see what happens.
>>
>>No, it does not always leave memory. If Excel is installed on the user PC, it quits fine usually, but if Excel is installed on the network, it does not (even in this simple two-lines code if call from command window. And this is my point: always use objexcel=.null.
>
>Are you absolutely sure that the following (which is what I always do anyway) doesn't work properly even with excel on the network?
>
>
oXl = CreateObject('Excel.Application')
>oXl.Quit()
>Release oXl
>
>I'm not really sure (I haven't seen what you've seen) that if oXl is local the 'release' is really necessary.
>
>Alan

If I use "release" without ...=.null. I often experience problems on shutdown. So for myself I always have three lines no matter what I am doing with Excel:

Objexcel.quit
Objexcel=.null.
release objexcel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform