Why EXCEL.EXE Processes Remain After C# Excel COM Automation — Reference Release Patterns and the Replacement Decision (archived 2026-07-27)
A practical look at why EXCEL.EXE processes remain running after automating Excel from C# via Microsoft.Office.Interop.Excel, explained through COM reference counting and the RCW mechanism. Covers the two-dot rule trap, the Marshal.ReleaseComObject vs. GC release patterns, the last-resort technique of identifying the PID from the window handle, and when to replace COM interop with Open XML SDK / ClosedXML. Archived version of https://comcomponent.com/en/blog/excel-com-interop-process-remains/, as published on 2026-07-27. The live article is maintained and may change after this date. First published 2026-07-03.
Authors
- Go Komura (ORCID: https://orcid.org/0009-0008-8895-8390)
Institutions
- Fujikura (United States) (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-07-27
- DOI
- https://doi.org/10.5281/zenodo.21614718
- Primary Topic
- Data Analysis with R
- Type
- article
- Field-Weighted Citation Impact
- 0.00