小编Jac*_*k W的帖子

从Button按功能区访问Excel工作表

好的,所以我得到了自动生成的主要AddIn(附件1),还有我的功能区(附件2),我想从该功能区访问当前活动的Excel工作表.但System.Windows.Forms.Application不包含定义ActiveSheet.

附件1:

using System;
using System.IO;
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;
using System.Windows.Forms;

namespace ExcelAddIn1
{
public partial class ThisAddIn
{
    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {

    }

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

    #region VSTO generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the …
Run Code Online (Sandbox Code Playgroud)

c# vsto ribbon ms-office excel-addins

8
推荐指数
2
解决办法
7971
查看次数

标签 统计

c# ×1

excel-addins ×1

ms-office ×1

ribbon ×1

vsto ×1