Excel 2013 setting dock position for Custom Task pane causes lag RRS feed

  • Question

  • Hello Support Team,

    We have a VSTO excel add-in application and have a query regarding performance of loading the custom task pane in Excel 2013. We observed that in Excel 2013 loading the custom task pane takes quite a bit of time, whereas on other versions of excel the task pane loads comparatively faster.

    At the code level, after the custom task pane is added, we do set the dock position of the task pane and also set its width. We observed that the code for setting the dock position and also setting the width of the task pane seems to take quite some time in Excel 2013. Whereas on other versions of excel the same code work fine, the loading of the task pane is quite faster.

    We tried removing the code for setting the dock position, and found that without setting the dock position or the width the task pane loads quite faster in excel 2013 as well. So I am not sure if it is related to the Excel 2013, can you please confirm. If so, is there any way to set the dock position of custom task pane without the lag issue in Excel 2013. We just want to set the dock position of the task pane to left and also set the width of the task pane. 

    Friday, July 11, 2014 7:59 AM

All replies

  • Hello Ranjana,

    What code do you use for setting up a task pane? Are you able to reproduce the issue with a newly created empty add-in project?

    Try to create a new add-in for use and then add  the following code:

    private MyUserControl myUserControl1;
    private Microsoft.Office.Tools.CustomTaskPane myCustomTaskPane;
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
        myUserControl1 = new MyUserControl();
        myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1,
            "New Task Pane");
        myCustomTaskPane.DockPosition =
        myCustomTaskPane.Height = 500;
        myCustomTaskPane.Width = 500;
        myCustomTaskPane.Visible = true;

    Do you see any delay?

    BTW Do you have any other add-ins installed for Excel?

    Friday, July 11, 2014 9:29 AM
  • Hello Eugene,

    Thank you for your reply.

    We are creating the custom task pane using the same code as you have provided above. 

    We tried on the machine where other add-ins were installed and also on a machine where only our add-in i.e. only one add-in is installed. On both the machine the delay was observed.

    Monday, July 14, 2014 12:04 PM
  • Dear Eugene,

    I can confirm that the problem exists in PowerPoint as well. In fact, it is a huge pain for my colleagues using the task panes of my add-in.

    I have been looking for a reason for the unusually slow task pane opening times for several months now. Ranjana's description is perfect: after adding code to set the dock position and/or the width of a task pane, the opening time will take longer, each adding an extra 2 seconds to the process.

    Any suggestion to remedy the problem would greatly be appreciated.

    Thx, Balazs
    Thursday, October 2, 2014 12:10 PM
  • This has been driving me crazy as well. Did you ever manage to solve it?



    Tuesday, October 28, 2014 4:47 PM
  • Anyone still watching this thread?
    Thursday, November 6, 2014 9:12 AM
  • Hello everyone,

    I've faced the same issue and observed interesting thing:
    When there is no active document in Excel 2013 custom task pane is created in relatively short time, but when an active workbook present then custom task pane creation time takes about 2.5 additional seconds.
    I've made infinite loop which creates identical CustomTaskPanes with 2 seconds interval and prints out the creation time. So here is some output:

    Excel has just launched, no workbook opened yet:

    CustomTaskPane creation time: 00:00:00.2430139
    CustomTaskPane creation time: 00:00:00.2590148
    CustomTaskPane creation time: 00:00:00.2990171
    CustomTaskPane creation time: 00:00:00.2580148
    CustomTaskPane creation time: 00:00:00.2580148
    CustomTaskPane creation time: 00:00:00.3010172

    Blank workbook opened:

    CustomTaskPane creation time: 00:00:05.1932970
    CustomTaskPane creation time: 00:00:02.6041490
    CustomTaskPane creation time: 00:00:02.7481572
    CustomTaskPane creation time: 00:00:02.7101550
    CustomTaskPane creation time: 00:00:02.6321506
    CustomTaskPane creation time: 00:00:02.6491516
    CustomTaskPane creation time: 00:00:02.9711699
    CustomTaskPane creation time: 00:00:03.1651811

    'FILE' menu opened (basically no active workbook is present):

    CustomTaskPane creation time: 00:00:00.2840163
    CustomTaskPane creation time: 00:00:00.3170182
    CustomTaskPane creation time: 00:00:00.3460198
    CustomTaskPane creation time: 00:00:00.3940225
    CustomTaskPane creation time: 00:00:00.3880222
    CustomTaskPane creation time: 00:00:00.3250186

    • Edited by Eugene I Friday, November 21, 2014 9:59 AM
    Friday, November 21, 2014 9:58 AM
  • See my suggestion here on Stackoverflow.

    Regards, Jörg
    • Edited by jreichert Thursday, January 22, 2015 8:34 AM
    Thursday, January 22, 2015 8:33 AM
  • Thanks Jörg, the only thing that helped me in PowerPoint so far was to redesign my task panes for the default (i.e. narrow) width, and not defining any specific width and position by code.

    With this, my task panes open almost instantaneously. However, once you do this, disabling the task pane animations will not speed things up any further, so right now it is everyone's decision which way to go.

    Currently, I am working in Visual Studio 2012. Does anyone have experience with VS 2013 regarding this topic? What I mean is: if you build the same solution in VS 2013, will you still have slow task panes?

    Best, Balazs

    Thursday, February 12, 2015 1:13 PM