473,770 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open Excel WebBrowser

Joe
Hi
Anyone using the WebBrowser with Excel in DotNet 2005???

I have it working with the code below from MS but am trying to eliminate the
following behaviors

1)Stop FileDownload Dialog from Opening
2)Stop Open XML Dialog from Opening
3)Stop a separate Instance of Excel from starting

Thanks

this.axWebBrows er1.NavigateCom plete2 += new
AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2EventHandler(t his.axWebBrowse r1_NavigateComp lete2);

private void button1_Click(o bject sender, System.EventArg s e)

{

String strFileName;

//Find the Office document.

openFileDialog1 .FileName = "";

openFileDialog1 .ShowDialog();

strFileName = openFileDialog1 .FileName;

//If the user does not cancel, open the document.

if (strFileName.Le ngth != 0)

{

Object refmissing = System.Reflecti on.Missing.Valu e;

oDocument = null;

axWebBrowser1.N avigate(strFile Name, ref refmissing, ref refmissing, ref
refmissing, ref refmissing);

}

}

public void axWebBrowser1_N avigateComplete 2(object sender,
AxSHDocVw.DWebB rowserEvents2_N avigateComplete 2Event e)

{

Object o = e.pDisp;

oDocument = o.GetType().Inv okeMember("Docu ment", BindingFlags.Ge tProperty,
null, o, null);

Object oApplication = o.GetType().Inv okeMember("Appl ication",
BindingFlags.Ge tProperty, null, oDocument, null);

Object oName = o.GetType().Inv okeMember("Name ", BindingFlags.Ge tProperty,
null, oApplication, null);

MessageBox.Show ("File opened by: " + oName.ToString( ));


}
Sep 29 '06 #1
0 1853

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6744
by: Perry | last post by:
I have no idea where to start, I just need a general idea if this is possible: Originally I created a vb app that uses the WebBrowser component to view excel files, which seemed to work fine, but does not give me the control over the user scrolling around the spreadsheet once it was loaded. I then tried using the OLE object to open an embedded excel form and that looks terribly ugly when you try to edit any of the fields.
1
1579
by: Gary | last post by:
Is there a way of selecting a specific worksheet in Excel and open it in the webbrowser control in vb.net thank Gary
9
2777
by: G .Net | last post by:
Hi Can anybody tell me how I can view an Excel file from within a vb.net application? Thanks in advance G
1
2734
by: Joe | last post by:
Hi I am able to embed Excel into a WebBrowser on my Dev machine but on a client machine an instance of Excel starts in it's own window. Anyone seen this before??? Thanks
1
2295
by: Joe | last post by:
Hi I have embedded Excel in a WebBrowser on a Form but none of Excels Menus are present Is this the way it is suppose to work??? Do I need to add my own button to print/save excel from webbrowser ??? Thanks
0
1248
by: morfasie | last post by:
Hi, I am using the code from microsoft Microsoft Webbrowser Excel My problem is, when I click on the excel file to open it, it opens up Office Excel with the file loaded, and nothing happens to the webbrowser control? I am using Office 2007? Is that maybe the reason? Please help, I want to open it into my webbrowser control
4
3753
by: Gregory Bloom | last post by:
I'm running Python 2.5 under Windows. If I fire up IDLE and enter: it works like a champ, opening the page in Firefox. Same thing goes from a Windows cmd shell: it works as advertised. But if I open a cygwin bash shell and try the same thing from a python prompt, I get: Traceback (most recent call last):
0
1578
by: arindams | last post by:
I'm getting problem in pasting HTML text in Excel 2007 whereas it is working fine in Excel 2003. The data pasted in excel 2007 is showing the the HTML code which is not desired. I need to have the text element as normal copy from HTML file in web browser is pasted in the opened excel cell (manual operation). I'm enclosing the code I've written in the following : Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
0
1588
by: arindams | last post by:
I've a form where an webrowser contains a html file. I want to copy a selective portion of the html content and paste that content in an excel 2007 file where it will be pasted as a normal text (not in HTML code). I want to have the excel part should be as it is done manually (i.e. it should be in proper format as it is in the HTML file). Platform/OS/Version : GUI/Windows XP/2005 Language :Vb.Net Private Sub frmParse_Load(ByVal sender...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.