Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: How to correctly dispose excel when using multiple threads?

$
0
0
From an Excel-DNA add-in, I suggest you never call back to Excel from another thread or Task. When you need to update Excel, just call the Excel-DNA helper ExcelAsyncUtil.QueueAsMacro with a delegate that does the Excel-related work. This delegate will then run on the main Excel thread, and you won't need any COM cleanup code anywhere.

-Govert

Viewing all articles
Browse latest Browse all 1741

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>