How to open an excel file from a button

pabby

Member
Joined
Nov 8, 2005
Messages
9
Programming Experience
Beginner
HI,

I am running visual studio .net and I have a simple web form with a button on it.

I want this button to open a specific excel document. I have posted on other forums and had different solutions but none that actually work. (possibly due to my inexperience as I am fairly new) I was close at one point with the following code:

Dim myexcel As Excel.Application
Dim x As String
x = ("c:\called.xls")


but I kept getting no further as I couldn't get the intellisense to come up with an "open" method. Can anyone let me know if I am on the right track - or supply the finishing piece of code - - it's starting to drive me nuts and I know that it is a simple piece. I just lack the correct syntax/experience.

any help will me much appreciated.

thanks.
 
And you're doing it in ASP.Net (you mentioned a web form)?

Also, are you just wanting to open the excel file, or are you using the information in it?

Sorry, I just want to be clear on the whole thing first. :)
 
open excel spreadsheet

HI

At the moment, I want the button just to open a spreadsheet in the usual fashion.

Can it be opened in the browser - edited and saved in the browser - if so, that would be better. This would be my preference, if not, then a simple "open" will do..

thanks again
 
Back
Top