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

Repost: output to xls works in firefox, not in IE

I have a puzzling problem. I am using some code I found in another
thread here to output the results of a gridview to excel. Here is the
subroutine:

Sub SendToExcel(ByVal Source As Object, ByVal E As EventArgs)
Dim gv As GridView =
Ctype(ColRep1Form.FindControl("xlsRep1GridView"),
GridView)
If gv.Rows.Count.ToString + 1 < 65536 Then
gv.AllowPaging = False
gv.AllowSorting = False
Dim tw As New System.IO.StringWriter()
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("content-disposition",
"attachment;filename=dept1.xls")
Response.Charset = ""
EnableViewState = False
gv.visible= true
gv.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
gv.DataBind()
End If
End Sub

This code works in firefox, or in IE when saving (not opening) the file
from the open/save dialogue. It doesn't work at all in IE when the
website is using https.(but it does work when using Firefox).

I would be grateful for any advice or explanation.

Thanks.

-- Ned

Dec 14 '06 #1
0 856

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

Similar topics

2
by: Ohaya | last post by:
Hi, We've been having a problem with one particular page that has a button on it, and a "tall" image (top-to-bottom). The button calls some simple Javascript to print the frame in which the...
7
by: Stan Brown | last post by:
I'm sorry, I should have mentioned that I'm running Mozilla 1.4 on Win 98 and my window is about 800 pixels wide. If any of that matters. The rest of this is what I posted a few minutes ago. ...
4
by: pdc | last post by:
have two web servers that I use, one is the primary and the other is a backup for when the server is down. I use a third, central server which redirects a browser's initial link to one of my web...
6
by: Alec MacLean | last post by:
Hi, I've created a small application for our company extranet (staff bulletins) that outputs a list of links to PDF's that are stored in a SQL table. The user clicks a link and the PDF is...
3
by: =?Utf-8?B?R2F1cmF2?= | last post by:
I have a simple .bat file (TESTMAIN.bat): "C:\fo.bat" -xml "C:\07.xml" -xsl "C:\fo.xsl" "c:\output.pdf" I call this using C#: System.Diagnostics.Process p = new System.Diagnostics.Process();...
1
by: David Henderson | last post by:
I know 'disable-output-escaping' has been discussed in the past, but I can't put my finger on any of the threads to see if my current problem is addressed. Sorry for re-asking the question if it...
9
by: jodleren | last post by:
Hi I have never done this before... but I could use it now. How do I create a "please wait" page, which will "reload" once my real page is ready? I am talking of a waiting time of some 10-20...
2
by: Jon | last post by:
Hello all, I've reposted this as I needed to remove the page for when the customer was taking a look therefore the previous post made no sense :) Could anyone help with a problem I have. In...
4
by: Michael Starberg | last post by:
- If it compiles, it works. - If it compiles, it's correct. - If it runs, it doesn't have any bugs. - If it doesn't have any immediately obvious bugs, it's perfect. - If a bug doesn't...
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...
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: 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
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,...
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...

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.