473,387 Members | 1,556 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,387 software developers and data experts.

Prevent Excel from opening in browser

I've got an intranet application that presents a list of files in sort of a
'central repository' web page. Each file is an href in the form <a
href=file://server/share/path/filename.ext>.

When the user clicks on an excel file, it is opening within the browser,
which unforntuntely confuses the heck out of them because the usual
Print/Print Preview menu options are not available. I would like the user
to be presented with the typical Open/Save dialog when clicking on this
link.

Over the past 16 hours or so, I've seen references to adding headers to the
repsonse, setting the content type to attachment to prevent the browser from
opening it. However, this only works if I'm generating the content or if
the file resides on the web server. The files in this case reside on
servers throughout the company.

Is there any way that I can force the browser to do the same thing as 'Save
Target As', without modifying the user mime configuration in IE (another
common suggestion), or hosting the files on the web server?

tia,

Bob M..
Jul 19 '05 #1
1 6914
In your scenario, you will need to make a change on the client machines.
The change is:

Windows Explorer:
Tools(View if NT) - Folder Options - File Types - XLS file extension (Excel
workbook if NT)
Browse in same window = FALSE
Confirm open after download = TRUE

Ray at home

"Bob Murdoch" <ra***********@erols.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I've got an intranet application that presents a list of files in sort of a 'central repository' web page. Each file is an href in the form <a
href=file://server/share/path/filename.ext>.

When the user clicks on an excel file, it is opening within the browser,
which unforntuntely confuses the heck out of them because the usual
Print/Print Preview menu options are not available. I would like the user
to be presented with the typical Open/Save dialog when clicking on this
link.

Over the past 16 hours or so, I've seen references to adding headers to the repsonse, setting the content type to attachment to prevent the browser from opening it. However, this only works if I'm generating the content or if
the file resides on the web server. The files in this case reside on
servers throughout the company.

Is there any way that I can force the browser to do the same thing as 'Save Target As', without modifying the user mime configuration in IE (another
common suggestion), or hosting the files on the web server?

tia,

Bob M..

Jul 19 '05 #2

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

Similar topics

2
by: Jeremy | last post by:
Hi, I am using the code below to create an excel document from data that is returned from an sql query. The formatting of the excel document is pretty and all is good unless I hit the back button...
6
by: Divya | last post by:
Hi, I have a web page which generates a CSV file based on some user input. When this file is downloaded by the user, the file is being automatically converted to .xls. Any idea how I can prevent...
4
by: Vishal | last post by:
Hello, I have a dataset with some content. I can convert this dataset in a csv format which is then stored in a stringwriter. Now I want this be open via excel, so I set the contenttype...
6
by: Daniel | last post by:
Hi all, Can i open and edit the excel sheet on web page after downloading? After editing, i close the web page and the excel file auto upload to the server. Is it possible? I really struggling...
2
by: monalisa | last post by:
I have a Datagrid in ASP.NET , Witch contains employee info and a Dropdownlist and a calendar control. For performance issue, the user wanted to fill this form in Excel, so I need to export the...
0
by: Matt Schwartz | last post by:
I have a ASP.NET web application written using VB.NET. I have a data grid, that is sent to the browser as an excel document using the following code Private Sub CreateXLS(ByVal xdatagrid As...
3
by: Fauna | last post by:
I'm having an Excel problem. I hope this is the appropriate group to post in. I am converting an existing classic ASP web application to ASP .NET. There is a reporting menu where the user...
4
by: JaxDawg | last post by:
I have a spreadsheet saved as an XML spreadsheet so I can manipulate it easier (and don't need COM). When I'm done, I want to display to the user. Currently, I'm using simple JavaScript in my PHP...
4
by: =?Utf-8?B?THluZXJz?= | last post by:
Hello All, We have a VB.NET application writen using VS 2003. This application apens an excel file from a vendor, reads the data and performs whatever functions it needs. We recently upgraded our...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
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...

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.