Web浏览器控件问题: [英] Web browser control issue:
本文介绍了Web浏览器控件问题:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的C#应用程序中使用Web浏览器控件。我尝试在浏览器控件旁边打开excel文件但是它打开了应用程序..你可以给你的建议朋友......紧急。
我尝试过:
Hi ,i am using web browser control in my C# application . i try to open excel file in side the browser control but its open out side the application ..can you pls give your suggestion friends...urgent.
What I have tried:
public void OpenFile(string filename)
{
// Check the file exists
if (!System.IO.File.Exists(filename)) throw new Exception();
m_ExcelFileName = filename;
// Load the workbook in the WebBrowser control
//this.WebBrowserExcel.Navigate(filename, false);
WebBrowserExcel.Navigate(filename, true);
}
推荐答案
使第二个布尔参数False
WebBrowser.Navigate Method(String,Boolean)(System.Windows.Forms) [ ^ ]
另请参阅如何使用WebBrowser在Windows窗体应用程序中集成Excel [ ^ ]
Make second Boolean parameter False
WebBrowser.Navigate Method (String, Boolean) (System.Windows.Forms)[^]
Also please refer How to Integrate Excel in a Windows Form Application using the WebBrowser[^]
这篇关于Web浏览器控件问题:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文