如何使用C#在表单窗口中打开Excel [英] How to open excel in form window using c#
本文介绍了如何使用C#在表单窗口中打开Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个表单,该表单具有两个按钮view和save.当我单击视图时,它应该在窗体窗口中显示excel表,当我单击保存时,它应该在sys中显示excel表.
研究了使用C#打开和导航Excel [
I have created a form where it has two buttons view and save . When i click on the view it should display the excel sheet in the form window and when i click save it should the excel sheet in sys .
Studied this Opening and Navigating Excel with C#[^]
wrote this for view button click event
Excel.Application excelApp = new Excel.ApplicationClass();
excelApp.Visible = true;
它打开一个excel应用程序.是否可以在窗体窗口中打开.
It opens an excel application . Is it possible to open on form window .
推荐答案
有一种使用WebBrowser
控件的方法,您可以将其添加到窗体中并用于打开Office.文档.请参阅此Microsoft知识库文章: http://support.microsoft.com/kb/243058 [ ^ ].
—SA
There is a way to use theWebBrowser
control which you can add to your form and use to open an Office document. Please see this Microsoft Knowledge Base article: http://support.microsoft.com/kb/243058[^].
—SA
这篇关于如何使用C#在表单窗口中打开Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文