By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,256 Members | 1,517 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,256 IT Pros & Developers. It's quick & easy.

Excel sheet problem

P: n/a

I am using Response object in to download an excel sheet with
It worked well and I could download excel file with data. But suddenly
It started downloading only blank excel sheet. even though the data
exists. Do I need to do any refreshing? or do I need to re-start IIS?

Dim dt As DataTable = DSCAG.Tables(0)

Dim strFileName As String = "Downloadfile.xls"
Response.Buffer = True
Response.ContentType = "application/"
Response.AddHeader("Content-Disposition", "attachment;
filename=""" & strFileName & """")
Response.ContentEncoding = System.Text.Encoding.UTF7
Response.Charset = ""
EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter
Dim oHTMLTextWriter As New

DGCAGReference.DataSource = dt


Dim strResponse As String = oStringWriter.ToString
strResponse = strResponse.Replace("</td>", "&nbsp;</td>")

I have noticed that in the blank excel sheet the excel sheet name is
".xls]Downloadfile[1]". I don't understand why the excel sheet name is
like that.

any ideas?


Aug 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.