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

I dont want to open the excel sheet in same browser

Hello folks,
I am exporting my gridview .net page to excel. Everything works fine, except that the excel sheet opens through IE browser. When i researched it, I found out it i can do it manualy by going to Folder Options/File Types and check Confirm Open after Download. And it works, but I cannot force every user to do that. How can I automate this process (coding)? Help is greatly appreciated!
Feb 12 '08 #1
1 1090
ShadowLocke
115 100+
Make sure you add the correct header. It needs to be an attachment if you want the prompt to open/save as

for example.. {C#}

Expand|Select|Wrap|Line Numbers
  1. Response.AddHeader("Content-disposition", "attachment; filename=\"excel.xls\""
(Quotes around file name for cross browser support)
Feb 14 '08 #2

Sign in to post your reply or Sign up for a free account.

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...
18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
5
by: Rajiv | last post by:
HI ALL, actually , i m working in a company having large number of employee , i have two userid and password . on id is from admin group(id given to me by technology manager) of the server and...
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...
3
by: Jennyfer Barco | last post by:
Hello, I have a question, how can I open Microsoft Excel from .NET. I only need to open a new file in Excel and paste some information and set the Microsoft Excel as the enabled aplication, so the...
3
by: jeremy.bird | last post by:
I am looking for a possible solution or bump in the right direction when working with excel on the web. Currently I am using and developing in visual studio 2005. Here is the situation I have a lot...
0
by: balu435 | last post by:
Hi I used the following code to enter values to an already open browser using VBA. Dim IeBrow As InternetExplorer Dim IeDoc As Object Set IeBrow = New InternetExplorer IeBrow.Visible = True ...
13
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then...
2
by: kunalgujar | last post by:
I am using ASP to open a excel file. I've noticed that Internet Explorer adds a number in square brackets to files downloaded from the internet and opened directly (i.e. by clicking 'Open' and not...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.