Click here to Skip to main content
11,410,750 members (64,471 online)
   

ASP.NET

 
GeneralRe: How do you debug a single ASPX file? PinmemberXarzu21-Mar-13 8:57 
GeneralRe: How do you debug a single ASPX file? Pinmemberjkirkerx21-Mar-13 11:16 
QuestionHow to open an existing excel file (not in the browser) in a new window from ASP.NET 3.5 with C# Pinmemberbnath00120-Mar-13 8:27 
AnswerRe: How to open an existing excel file (not in the browser) in a new window from ASP.NET 3.5 with C# Pinmemberdusty_dex20-Mar-13 10:52 
AnswerRe: How to open an existing excel file (not in the browser) in a new window from ASP.NET 3.5 with C# PinmemberBernhard Hiller21-Mar-13 0:47 
GeneralRe: How to open an existing excel file (not in the browser) in a new window from ASP.NET 3.5 with C# Pinmemberdusty_dex21-Mar-13 6:27 
QuestionASP.NET EXPORT TO EXCEL PinmemberMkanchha19-Mar-13 7:02 
AnswerRe: ASP.NET EXPORT TO EXCEL PinmemberKarthik Harve19-Mar-13 22:14 
try below code.

gvRpt.AllowPaging = False
gvRpt.GridLines = GridLines.Both
Dim style As String = "<style> .text { mso-number-format:\@; } </script> "
Response.ClearContent()
Response.Clear()
Response.Buffer = True
Response.Charset = ""
Me.EnableViewState = False
Response.AddHeader("content-disposition", "attachment;filename=" & RptName & ".xls")
Response.ContentType = "application/vnd.ms-excel"
Dim sw As New StringWriter()
Dim htw As New HtmlTextWriter(sw)
gvRpt.RenderControl(htw)
Response.Write(style)
Response.Write(htw.ToString())
Response.End()

hope it works.
Vande Matharam - Jai Hind

GeneralRe: ASP.NET EXPORT TO EXCEL PinmemberMkanchha21-Mar-13 0:37 
GeneralRe: ASP.NET EXPORT TO EXCEL PinmemberBernhard Hiller21-Mar-13 0:50 
GeneralRe: ASP.NET EXPORT TO EXCEL PinmemberMkanchha21-Mar-13 1:59 
QuestionMaintaining Variables Pinmemberclugsy6419-Mar-13 6:53 
AnswerRe: Maintaining Variables Pinmemberjkirkerx19-Mar-13 9:39 
GeneralRe: Maintaining Variables Pinmemberclugsy6419-Mar-13 10:11 
GeneralRe: Maintaining Variables [modified] Pinmemberjkirkerx19-Mar-13 11:14 
QuestionMVC 4 and WebForm Application: # symbol is appearing in URL PinmemberDavid Mujica19-Mar-13 6:18 
AnswerFound Solution PinmemberDavid Mujica19-Mar-13 11:58 
QuestionBAT FILE NOT GIVING PROPER RETURN VALUE in TXT file PinmemberNishant kumar electronics17-Mar-13 2:46 
AnswerRe: BAT FILE NOT GIVING PROPER RETURN VALUE in TXT file PinmvpRichard MacCutchan17-Mar-13 3:40 
GeneralRe: BAT FILE NOT GIVING PROPER RETURN VALUE in TXT file PinmemberNishant kumar electronics17-Mar-13 9:35 
GeneralRe: BAT FILE NOT GIVING PROPER RETURN VALUE in TXT file PinmvpRichard MacCutchan17-Mar-13 23:01 
QuestionComplete Editable Datagrid PinmemberGirish_Sharma17-Mar-13 0:02 
AnswerRe: Complete Editable Datagrid PinmemberChris Hambleton18-Mar-13 5:30 
Questionasp.net c# Pinmembervishal415-Mar-13 21:11 
AnswerRe: asp.net c# PinmvpSandeep Mewara15-Mar-13 21:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150414.5 | Last Updated 24 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid