Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
Out of memory exception [email protected] Excel Discussion (Misc queries) 0 March 27th 07 10:53 AM
Out of memory exception [email protected] Excel Programming 0 March 27th 07 10:51 AM
handle #VALUE exception Andis Cirulis Excel Worksheet Functions 2 November 13th 06 11:32 AM
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc Angus Comber[_2_] Excel Programming 1 November 7th 03 01:18 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"