Using Wrapper objects to Properly clean up excel interop objects

前端 未结 5 1104
滥情空心
滥情空心 2021-02-20 02:39

All of these questions:

  • Excel 2007 Hangs When Closing via .NET
  • How to properly clean up Excel interop objects in C#
  • How to properly clean up inte
5条回答
  •  自闭症患者
    2021-02-20 03:30

    We use the LifetimeScope class that was described in the MSDN magazine. Using it properly cleans up objects and has worked great with our Excel exports. The code can be downloaded here and also contains the magazine article:

    http://lifetimescope.codeplex.com/SourceControl/changeset/changes/1266

提交回复
热议问题