.NET EXcel Interop 'Not enough memory to run Excel' error

A

Ashley gr

We've a Windows application(rich-client application) which
uses set of data in the excel input files and generates
around 58 workbooks with each workbook containing around
32 sheets each.

We tried it in Excel 97.

Application makes extensive use of the Excel object model
to generate the files.

Application release all the Excel hidden objects using
Marshal.ReleaseCOMOBject and it does all this thing
correctly to the best of my knowledge. We also call the
GC.Collect() & GC.WaitForPendingFinalizer() just to be
sure that the memory is cleaned-up. I understand there'll
be a performance hit. But it's okay as long it's stable
but it's not the case right now.

Problem is after 5 successful test runs, without closing
the application, Not Enough Memory to Run Microsoft Excel
error pops-up and everything is over. After this, i see
the same message when trying to launch Excel 97 or Word
from my computer. I've to restart so as to use any of
Office applications again.

I'd really appreciate someone telling me if there are any
bugs in Excel 97 itself that resuls in these or any
workaround.

I need some help ASAP.

I looked at the log using the PerfMon and the following
values:
Process - Private bytes -> 5.7 MB - 27.1 MB with average
around 19 MB
..NET CLR Memory - #Bytes in all heaps -> 0.312 MB - 3.3 MB
with an average value around 0.9 MB

SInce the above counters are kinda okay, i'm not sure
whether there is a memory leak.

My computer has 256 MB RAM and i've set the initial size
of the virtual memory to 700 MB.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top