Can anyone suggest me the proper approach for performance optimization while generating around 600 excel reports programatically.

I am facing issues different issues like:
-> Un ending loop.
-> Code crash after generationg aroung 25 to 30 reports at a time.

I am using Excel COM object to create excel report.

thanx in advance for suggestions.