Click here to Skip to main content
15,887,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello guys,

I've been working on a c# project recently. It reads selected info from all sheets in a certain folder, and puts them in a access database and also makes a report in cr.

Now when I run my appliction it works great and does eevrything it is supposed to do, but when it is finished it keeps running a EXCEL.EXE service for each sheet which uses a lot of disk usage, the services keep running for like 60 seconds and then they disapear. It's really annoying because it really slows down my appliction and my whole system. I've tried to close the workbook, kill the services after each loop but nothing works and it keeps creating all these services in the background.

Please can someone help me with this problem?

Thanks in advance,


Bas
Posted
Comments
VICK 11-Oct-13 4:13am    
are you closing all sheets which u r opening and quitting the Interop Excel object on task completion?

If not than use

Excelobj.Sheet1.close();
Excelobj.Quit();
basvo 11-Oct-13 4:25am    
I've tried that, but it doesn't work, thanks for the answer though.
Subramanyam Shankar 16-Mar-15 13:42pm    
Please can you post your code?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900