将 office (Word Excel) 嵌入到 WinForms 或 WPF 控件中 [英] Embed office (Word Excel) into WinForms or WPF control
本文介绍了将 office (Word Excel) 嵌入到 WinForms 或 WPF 控件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在 WinForms 控件中嵌入 Office 应用程序(在计算机上安装了 office)?
Is it possible to embed Office application in WinForms control (having office installed on computer)?
推荐答案
你只需要添加这些 using 语句:
You just need to add these using statements:
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
然后您可以添加 ExcelObj
并添加一个 Workbork
和一个 Worksheet
.一切都很好解释.
Then you can add ExcelObj
and add a Workbork
and a Worksheet
to that. Its all pretty self explanatory.
这篇关于将 office (Word Excel) 嵌入到 WinForms 或 WPF 控件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文