Excel 2013自定义任务窗格无法显示 [英] Excel 2013 Custom task pane not displaying

查看:181
本文介绍了Excel 2013自定义任务窗格无法显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我需要迁移现有的自定义任务窗口程序才能使用Excel 2013.

我遇到任务窗格而不是出现问题。



所以我决定基于

https://msdn.microsoft.com/en-us/library/aa942846.aspx [ ^ ]用于测试目的。



我在Excel 2013中禁用/删除所有活动的加载项。

但是当进入调试模式时,这个原型自定义任务窗格仍然没有出现。

调试期间MS Visual Studio没有遇到任何编程错误。



我还有什么其他的错过/做错了?



Hi All,

I need to migrate my existing custom taskpane program to work with Excel 2013.
I encounter task pane not appearing issue.

So i decided to create custom task pane prototype for the Excel 2013 based on
https://msdn.microsoft.com/en-us/library/aa942846.aspx[^] for testing purpose.

I have disable/remove all active add-in in my Excel 2013.
But this protoype custom taskpane still does not appear when go to debug mode.
There is no programming error encounter by MS Visual Studio during debugging.

What else did i miss/do wrong?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Core;
using Microsoft.Office.Tools.Excel;

namespace ExcelAddIn5
{
    public partial class ThisAddIn
    {
        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, "My Task Pane");
            myCustomTaskPane.Visible = true;
        }

        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }

        #region VSTO generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
        
        #endregion
    }
}

推荐答案

找到解决方案,结果程序干扰了这段代码。
Found the solution, turn out program is interfereing with this code.


这篇关于Excel 2013自定义任务窗格无法显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆