How to open an existing excel file (not in the browser) in a new window from ASP.NET 3.5 with C#
-
Hello folks,
I thought this would be very simple. but I am not able to.
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser). Any suggestions?
[some excel file](file://domainname/vol1/destinationfiles/sheet.xls)
The excel file I am trying to open is not on IIS server. It is on file server.
Thanks muchnath
. -
Hello folks,
I thought this would be very simple. but I am not able to.
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser). Any suggestions?
[some excel file](file://domainname/vol1/destinationfiles/sheet.xls)
The excel file I am trying to open is not on IIS server. It is on file server.
Thanks muchnath
.Where do you expect the excel file to run? On the server side? Remote launching of apps at the client end is possible, but I doubt that you can do this directly (see below) from web server code. Also presumes they have Office installed on the remote machine. Remote execution needs to be enabled/allowed at the far end.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.
-
Hello folks,
I thought this would be very simple. but I am not able to.
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser). Any suggestions?
[some excel file](file://domainname/vol1/destinationfiles/sheet.xls)
The excel file I am trying to open is not on IIS server. It is on file server.
Thanks muchnath
.Strange. I also thought it was easy. But on my system, every call to a href="file:..." fails when the page containing the link was obtained via http. Such links do work only when the page was opened with the file protocol. And the links do fail when the file to be opened is not on a local or mapped drive. Browsers offer to open the file (with Excel) when it is on a local/mapped drive or just download it. I tested with current versions of Internet Explorer, Firefox, Chrome, Opera, and Safari.
-
Strange. I also thought it was easy. But on my system, every call to a href="file:..." fails when the page containing the link was obtained via http. Such links do work only when the page was opened with the file protocol. And the links do fail when the file to be opened is not on a local or mapped drive. Browsers offer to open the file (with Excel) when it is on a local/mapped drive or just download it. I tested with current versions of Internet Explorer, Firefox, Chrome, Opera, and Safari.
Well I've never tried it, (this is dusty_dex by the way - having account problems :~ ) The web server would most likely need to generate a local script with *application name hard coded*, then execute via a shell COM object. The local script can then do some remote checking of its own, and then launch the remote application. (Windows Script Host) That's how I would try to do it.
-
Strange. I also thought it was easy. But on my system, every call to a href="file:..." fails when the page containing the link was obtained via http. Such links do work only when the page was opened with the file protocol. And the links do fail when the file to be opened is not on a local or mapped drive. Browsers offer to open the file (with Excel) when it is on a local/mapped drive or just download it. I tested with current versions of Internet Explorer, Firefox, Chrome, Opera, and Safari.
Well I've never had to try it, The web server would most likely need to generate a local script with *application name hard coded*, then execute via a shell COM object. The local script can then do some remote checking of its own, and then launch the remote application. (Windows Script Host) That's how I would try to do it.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.