在WebBrowser中查看Excel文件,打开时却是单独打开的,没有在WebBrowser中显示。另外,已运行OFFICE.REG文件,问题还是一样。
重新安装Office 2003一样没有解决。
但奇怪的是,换成word文件却能正常在WebBrowser中打开。
代码如下:
Dim Web As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
Web.OfficeToolBar = False
Web.Address = ""
Dim dlg As New OpenFileDialog
dlg.Filter= "Excel文件|*.xls"
If dlg.ShowDialog = DialogResult.Ok Then
Web.Address = dlg.FileName
SaveConfigValue("文件路径",dlg.FileName)
End If
电脑配置:win 7 64位+ie8+office 2003
坛里的方法试来试去也没用,发贴求助。。。