none
Excel 2010 hangs with huge number of embedded objects (Excel 2007 works fine). RRS feed

  • Question

  • I have developed a C++ add-in to Excel that embeds hundreds or even thousands of COM objects in Excel. It works fine in Excel 2007 but Excel 2010 hangs for 15-20 minutes when I try to close the workbook if many objects are embedded.

    I discovered that 'Excel 2010 treats OLEObjects different from Excel 2007' - see my thread in Office Developer Center > Microsoft Office for Developers Forums > Excel for Developers. I found a work-around for that problem - it was a reference-counting issue - but the current problem might be related.

    I noticed that Excel 2007 requires .NET 3.5 whereas Excel 2010 requires .NET 4.0. Since I also use c# in my solution I thought that there might be an issue with .NET 3.5 and 4.0 requiring different interops. Can that be the cause of my trouble?
    How can I investigate in this? Can you suggest any solution?

    BR, Stefan
    Saturday, February 25, 2012 7:03 PM

All replies

  • Hi Stefan,

    Would you like to tell us how your project look like, I'm unable to image how you develop a COM add-in via C++, meanwhile .NET involved as well.

    Have you implement some events like Workbook.Close, if yes, would you like to post the code?

    I look forward to hearing of you.

    Good day,


    Calvin Gao[MSFT]
    MSDN Community Support | Feedback to us

    Monday, February 27, 2012 3:20 AM
    Moderator
  • Hello Stefan,

    My name is Will with Microsoft Excel support. I have looked through some bugs in our internal bug database and I believe I have found confirmation that functions such as these are returning NULL in Excel 2010 where they used to return a boolean. Unfortunately the developers declined to fix this behavior, stating that one would not generally query a method. In your case however, this would seem to be a problem.

    Because of the complexity of the case, I would recommend you open a support case with our Office Integration team as they handle cases where Excel is being automated from a .NET application. If the problem does turn out to be a bug, you won't be charged for the support case.

    Will Buffington
    Microsoft Excel Support

    Monday, February 27, 2012 4:32 PM
  • Thanks for this information!

    I'll do as you suggest,

    Best regards,

    Stefan

    Monday, March 5, 2012 11:41 AM