![]() New System.IO.StringWriter() new .HtmlTextWriter(oStringWriter) //this. Response.ContentType = "application/vnd.ms-excel 8.0" Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", string.Format("attachment filename=", filename)) Response.AddHeader("content-disposition", "attachment filename=FileName.xls") SqlDataAdapter(cmd) new DataSet() true //Response.ContentEncoding New SqlCommand ("select name,region from setup_employee where quicklook_id='VP185041'", conn) new SqlDataSource1.SelectCommand = Session.ToString() Void VerifyRenderingInServerForm( Control control) Response.ContentType = "application/vnd.xls" ![]() Response.AddHeader( "content-disposition", Like Vasille says in the comment to this question, if your file is not actually in UTF-8 format, you may technically want to convert the characters within the file to the encoding you want before opening in Excel. SqlDataSource1.SelectCommand += " and email in (" + Session.ToString() + For some other encoding, use the code page identifier, which you can find in the Text Import Wizard in Excel or in this list. ![]() SqlDataSource1.SelectCommand = Session.ToString() We are sorry for the inconvenience." whenever i click on the Export Excel button I tried the code you pasted in your reply like you suggested as below and i am getting the error as " has encountered a problem and needs to close.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |