473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 2756
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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@h54g2000cwb.googleg roups.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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.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_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.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********@email.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***********************@swspectrum.comwrote in message
news:dl********************************@4ax.com...
On Thu, 2 Nov 2006 12:33:03 -0000, "G .Net" <no********@email.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********@email.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***********************@swspectrum.comwrote in message
news:e3********************************@4ax.com...
On Thu, 2 Nov 2006 19:26:55 -0000, "G .Net" <no********@email.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
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...
3
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...
1
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...
0
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...
2
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,...
16
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...
8
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...
1
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.