Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reporting using Excel, Excel remains open
Message
De
13/03/2003 15:55:57
 
 
À
13/03/2003 15:45:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00765514
Message ID:
00765577
Vues:
25
>>>i agree
>>>
>>>
>>>>>>'Release' will only release the variable. It won't take XL out of memory, and it really isn't needed anyway if oleexcel is local. oleexcel.quit() is the way to go as Selim pointed out.
>>>>>
>>>>>also Selim is correct, and this is also the more correct way, realese oleexcel will terminate excel. try and watch the task manager:
>>>>>oleexcel = CREATEOBJECT("Excel.application")
>>>>>release oleexcel
>>>>>
>>>>>i would think that this would be equal to terminating the process in the task manager.
>>>>
>>>>Yes, you're correct. I just tested it, and release does close XL. Somehow using the XL object to close itself still seems more OOP though.
>>>>
>>>>Alan
>>
>>In every system I've ever used that did this, just releasing the variable leaves an instance of Excel running in Task Manager. Try doing several of these in a row and see what happens.
>
>Fred, I just tried it a half dozen times creating and releasing 7 times each. In every case, checking task manager showed no instances left in memory. However I seem to have a vague recollection that this might happen if the spreadsheet data is manipulated heavily, and this is done several times in a row.
>
>Personally, I use quit(), and I've yet to suffer a problem doing it that way.
>
>Alan

I use ox.quit(), too, and don't have any problems. It does seem to be if you actually do anything with the instances. Just creating and releasing seems to go away just fine.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform