Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Out of memory exception
Hi,
I have a C# Windows Form based application that has to create hundreds of excel files. (At least some 500. This is minimum.) When I ran this application, it threw "Out of memory exception" after creating some 55 files. Code calls all relevent APIs (Quit, Marshal.ReleaseComObject, etc and finally excel application was set to null.). But still I get this problem. I observed, calling Quit and setting to null, does not immediately delete Excel.Exe from Task Manager. Any ideas would be greatly appreciated. Thanks in advance, Aravind |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Out of memory exception
Hi, in my opinion, if you introduce a slight delay before your loop continues
its next iteration, it should solve the issue. Also, you should release all the intermediate objects you created within your loop. Further, please ensure that you have not declared any variables within the loop. I hope these tips help you. " wrote: Hi, I have a C# Windows Form based application that has to create hundreds of excel files. (At least some 500. This is minimum.) When I ran this application, it threw "Out of memory exception" after creating some 55 files. Code calls all relevent APIs (Quit, Marshal.ReleaseComObject, etc and finally excel application was set to null.). But still I get this problem. I observed, calling Quit and setting to null, does not immediately delete Excel.Exe from Task Manager. Any ideas would be greatly appreciated. Thanks in advance, Aravind |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Out of memory exception
On Mar 28, 4:01 am, Madhan wrote:
Hi, in my opinion, if you introduce a slight delay before your loop continues its next iteration, it should solve the issue. Also, you should release all the intermediate objects you created within your loop. Further, please ensure that you have not declared any variables within the loop. I hope these tips help you. " wrote: Hi, I have a C# Windows Form based application that has to create hundreds of excel files. (At least some 500. This is minimum.) When I ran this application, it threw "Outofmemoryexception" after creating some 55 files. Code calls all relevent APIs (Quit, Marshal.ReleaseComObject, etc and finally excel application was set to null.). But still I get this problem. I observed, calling Quit and setting to null, does not immediately delete Excel.Exe from Task Manager. Any ideas would be greatly appreciated. Thanks in advance, Aravind- Hide quoted text - - Show quoted text - Hi Madan, Thanks for the reply. But I have already followed all those techniques. I am properly releasing all variables calling ReleaseComObject(), set them to null and called Quit() on Excel.Application. After creating 10 excels, I introduced some delay. But nothing worked out. Some times it is throwing "Unknown Software Exception". I am using VS2005 Team Edition. Any iedas??? Regards Aravind |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XL 2007 - Out of Memory - memory leak/bug? | Excel Discussion (Misc queries) | |||
Out of memory exception | Excel Discussion (Misc queries) | |||
Out of memory exception | Excel Programming | |||
handle #VALUE exception | Excel Worksheet Functions | |||
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc | Excel Programming |