473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Viewing an excel file

Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G
Nov 2 '06 #1
9 2768
What do you mean by view? Do you want to host/embed an excel
application or just read the data or something else?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G
Nov 2 '06 #2
Hi

Simply display a read only view of an excel file.

G

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
What do you mean by view? Do you want to host/embed an excel
application or just read the data or something else?

Thanks,

Seth Rowe
G .Net wrote:
>Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G

Nov 2 '06 #3
The easiest way to display an excel file is to use a webbrowser control
and set the url to the target excel file. As far as readonly goes,
either tag the excel file as readonly or even use the protection
feature to "lock down" all the cells.

I'm curious, why not just use a datagrid instead of excel to display
the data?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Simply display a read only view of an excel file.

G

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
What do you mean by view? Do you want to host/embed an excel
application or just read the data or something else?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G
Nov 2 '06 #4
Hi Seth

The excel file has graphics and formatting etc.

As far as the webbrowser control. Can you give me some example code?

Thanks in advance

G

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
The easiest way to display an excel file is to use a webbrowser control
and set the url to the target excel file. As far as readonly goes,
either tag the excel file as readonly or even use the protection
feature to "lock down" all the cells.

I'm curious, why not just use a datagrid instead of excel to display
the data?

Thanks,

Seth Rowe
G .Net wrote:
>Hi

Simply display a read only view of an excel file.

G

"rowe_newsgrou ps" <ro********@yah oo.comwrote in message
news:11******* *************** @h54g2000cwb.go oglegroups.com. ..
What do you mean by view? Do you want to host/embed an excel
application or just read the data or something else?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G

Nov 2 '06 #5
No sample code needed really - you can do it through the designer.
First add the webbrowser control to your form - its under common
controls in the toolbox. Next, pull up the properties browser and set
the webbrowser's URL property to the excel files directory. That should
be it.

Thanks,

Seth Rowe
G .Net wrote:
Hi Seth

The excel file has graphics and formatting etc.

As far as the webbrowser control. Can you give me some example code?

Thanks in advance

G

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ k70g2000cwa.goo glegroups.com.. .
The easiest way to display an excel file is to use a webbrowser control
and set the url to the target excel file. As far as readonly goes,
either tag the excel file as readonly or even use the protection
feature to "lock down" all the cells.

I'm curious, why not just use a datagrid instead of excel to display
the data?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Simply display a read only view of an excel file.

G

"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
What do you mean by view? Do you want to host/embed an excel
application or just read the data or something else?

Thanks,

Seth Rowe
G .Net wrote:
Hi

Can anybody tell me how I can view an Excel file from within a vb.net
application?

Thanks in advance

G
Nov 2 '06 #6
On Thu, 2 Nov 2006 12:33:03 -0000, "G .Net" <no********@ema il.comwrote:

¤ Hi
¤
¤ Can anybody tell me how I can view an Excel file from within a vb.net
¤ application?

See if the following works for you:

How To Use the WebBrowser Control to Open an Office Document in Visual Basic .NET
http://support.microsoft.com/kb/304643
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 2 '06 #7
Hi Paul

Thanks for the information.

I've tried it successully. However, I was wondering if you could help
further? When I open an excel file using Navigate, a dialog appears asking
if I want to save or open the file. Can this be avoided so that the file is
merely loaded into the component?

G

"Paul Clement" <Us************ ***********@sws pectrum.comwrot e in message
news:dl******** *************** *********@4ax.c om...
On Thu, 2 Nov 2006 12:33:03 -0000, "G .Net" <no********@ema il.comwrote:

¤ Hi
¤
¤ Can anybody tell me how I can view an Excel file from within a vb.net
¤ application?

See if the following works for you:

How To Use the WebBrowser Control to Open an Office Document in Visual
Basic .NET
http://support.microsoft.com/kb/304643
Paul
~~~~
Microsoft MVP (Visual Basic)

Nov 2 '06 #8
On Thu, 2 Nov 2006 19:26:55 -0000, "G .Net" <no********@ema il.comwrote:

¤ Hi Paul
¤
¤ Thanks for the information.
¤
¤ I've tried it successully. However, I was wondering if you could help
¤ further? When I open an excel file using Navigate, a dialog appears asking
¤ if I want to save or open the file. Can this be avoided so that the file is
¤ merely loaded into the component?
¤
¤ G

It's the security mechanism that is implemented for displaying files in the IE browser which can be
potentially dangerous. Excel would be on the list since it can contain auto macro code.

When the Open/Save dialog pops, there is an option in the dialog which allows you to disable this
feature for the file type. If you un check it then the popup warning will no longer be displayed.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 6 '06 #9
Thanks Paul

"Paul Clement" <Us************ ***********@sws pectrum.comwrot e in message
news:e3******** *************** *********@4ax.c om...
On Thu, 2 Nov 2006 19:26:55 -0000, "G .Net" <no********@ema il.comwrote:

¤ Hi Paul
¤
¤ Thanks for the information.
¤
¤ I've tried it successully. However, I was wondering if you could help
¤ further? When I open an excel file using Navigate, a dialog appears
asking
¤ if I want to save or open the file. Can this be avoided so that the file
is
¤ merely loaded into the component?
¤
¤ G

It's the security mechanism that is implemented for displaying files in
the IE browser which can be
potentially dangerous. Excel would be on the list since it can contain
auto macro code.

When the Open/Save dialog pops, there is an option in the dialog which
allows you to disable this
feature for the file type. If you un check it then the popup warning will
no longer be displayed.
Paul
~~~~
Microsoft MVP (Visual Basic)

Nov 10 '06 #10

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

Similar topics

13
35509
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy...
3
20275
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet (MyXL). It uses the worksheet's Application property to make Microsoft Excel visible, to close it, and so on. Using two API calls, the DetectExcel Sub...
1
4672
by: mail2atulmehta | last post by:
Hi, I do not know if this is right place for this, but i need some help. I have a text file, whose values are seprated by a delimiter. I want to open this file in excel, ( not import it) . I have written the driver prg in c#. The code opens the file, but it is not writting the values from text file into excel file. I can not figure out the...
0
921
by: Michelle | last post by:
Howdy! I have a windows app where you can add attachments to memos. These attachments can be anything (word, excel, pdf, etc). One form in my app lists the names of the attachments in a List and the user can select one to view. My code right now takes the attachment, puts it into a new file stream to the path C:\Temp, writes the file to...
2
3112
by: Mad Scientist Jr | last post by:
>From an asp.net web page I want the user to open the results of a SQL query in Excel, as automatically as possible (ie not having to loop through columns, rows, in code). For this, dataset.writexml works great (got the code from http://forums.devx.com/archive/index.php/t-57273.html ) The only question I have is, when Excel opens up, it...
16
2680
by: alexia.bee | last post by:
Hi all, In some weird reason, excel instance won;t die if i remove the comment from 4 lines of setting values into struct. here is a snipcode public System.Collections.Generic.List<frmMain.sDBTest> LoadTestSet(string TestSetFile, System.Collections.Generic.List<frmMain.sDBTestDBviewList)
8
6083
by: Sheldon | last post by:
I just received a 2nd (configured as a dual) monitor but, for Access only, I can't seem to figure out, if it's possible, to view, say, Table1 on one monitor and Table2 on the other monitor. If I open Table1, then Table2, Table2 apparently sits directly over Table1 and seems anchored so that I cannot move it "out of the way". Is this...
1
1341
by: dhenderson | last post by:
Hi - I inherited a site - www.highparkclub.com/curling.asp If you look at any of the schedules - and you don't have excel installed it gives you the option to view or save the file. For Mac users - this causes even more problems, as the link does not work at all. Is there a simple way to correct this, or do I need to associate the file...
0
2694
by: jwmaiden | last post by:
Have an application that opens up a webbrowser control to display data in an Excel spreadsheet (using VB.NET in VS 2005). No problem with opening the spreadsheet or displaying the data, but I'm having problems with repeating the process. I want to create an Excel spreadsheet, add some data to it, and display the results in a webbrowser control. I...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
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...
0
7974
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...
1
5513
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...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.