【问题标题】:Open excel file inside a window in wpf在wpf的窗口内打开excel文件
【发布时间】:2014-07-09 06:37:24
【问题描述】:

我想在我的 wpf 窗口中显示一个 excel 文件,如下所示:

如果我创建一个 excel 应用程序,然后将 Visible 属性设置为 true,Excel 应用程序将打开,我不希望出现这种行为。

Microsoft.Office.Interop.Excel.Application xlsxApp = new Microsoft.Office.Interop.Excel.Application();
Workbook workbook = xlsxApp.Workbooks.Open(path);
xlsxApp.Visible=true; //Excel will open, I don't want this.

【问题讨论】:

    标签: c# wpf excel


    【解决方案1】:

    您正在寻找的是嵌入在 Wpf 控件中的 Excel。 This page 可能是一个好的开始。总而言之,它必须使用 ActiveX 包含在您的 UI 中。

    本身并没有纯 WPF excel 控件。

    如果您需要在不需要打开现有文件的情况下模拟一些 Excel 功能,那么互联网上有很多“类似 Excel”的控件是否免费提供。例如this one

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 2011-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多