Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

C# Release Excel Objects

$
0
0
I have an application written in C# that runs from within ArcMap and it creates an Excel file on the fly using Microsoft.Office.Interop.Excel objects.

It works fine except the Excel process hangs until you close ArcMap.

In the code I save and close the workbook object, quit the Excel application object and then do a Marshal.ReleaseComObject on them.

I thought this was supposed to terminate the Excel process but that doesn't happend until ArcMap is closed.

I had a VB6 version of this application and in that case I did a save and close on the workbook object, quit the Excel application object and set them all = Nothing. This worked as the Excel process ended when the application completed running, you didn't have to close ArcMap.

So... anybody know what else I have to do in C# to make the Excel process terminate, without closing ArcMap?

Thanks.

Viewing all articles
Browse latest Browse all 1374

Trending Articles