Not enough memory to run Microsoft Excel. Please close other applications and try again
-
Hi, We have a windows application developed using c#. We have a process in this application where excel objects are created some data is populated and some calcualtions are done too (used various excel objects like workbook, sheet, range). The required tasks are being executed fine but there are instances where the same tasks fail. An error is being thrown at that time and it is "THERE IS NOT ENOUGH MEMORY TO RUN MICROSOFT EXCEL. PLEASE CLOSE OTHER APPLICATION AND TRY AGAIN" The error is pointed to Excel object creation and it shows - "An unhandled exception of type System.Runtime.InteropServices.COMException occurred in application_name.exe" What could be the cause for the error? Please provide some suggestions. Thanks
gauthee
-
Hi, We have a windows application developed using c#. We have a process in this application where excel objects are created some data is populated and some calcualtions are done too (used various excel objects like workbook, sheet, range). The required tasks are being executed fine but there are instances where the same tasks fail. An error is being thrown at that time and it is "THERE IS NOT ENOUGH MEMORY TO RUN MICROSOFT EXCEL. PLEASE CLOSE OTHER APPLICATION AND TRY AGAIN" The error is pointed to Excel object creation and it shows - "An unhandled exception of type System.Runtime.InteropServices.COMException occurred in application_name.exe" What could be the cause for the error? Please provide some suggestions. Thanks
gauthee
Hi! With this degree of information it's really hard to give you the exact reason for your problem, but I think most likely it's due to resource leaks. Does it work again after restarting your application (and Excel)? Does it fail on first run or after a while? Do you release all the COM objects your app creates?
Regards, mav -- Black holes are the places where God divided by 0...
-
Hi! With this degree of information it's really hard to give you the exact reason for your problem, but I think most likely it's due to resource leaks. Does it work again after restarting your application (and Excel)? Does it fail on first run or after a while? Do you release all the COM objects your app creates?
Regards, mav -- Black holes are the places where God divided by 0...
mav, Thanks for the reply! Sorry, if the info provided was unclear, what else you would require to analyze further? The other details are as follows: 1.When the error occurs we no longer can open an excel file. 2.After the system restart the excel application work. 3.Strangely the error(not enough memory) willnot occur when the number of processes running in my machine are minimal, when i run more applications/processes in my system this exce memory error occurs. 4.all COM objects related to excel are being released(not 100% sure though). we are searching for any excel processes running and then doing the kill process too! Thanks!
gauthee