TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohammad Aman
Tech Writer
327
72.7k
Border not showing in excel after exporting in ASP.Net
Feb 24 2016 12:49 AM
My code is here . I am exporting excel sheet by using this code but cell borders are not showing in my excel sheet:
Private Sub ExportGridToExcel()
Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.Charset = ""
Dim FileName As String = "Vithal" + DateTime.Now + ".xls"
Dim strwritter As New StringWriter()
Dim htmltextwrtter As New HtmlTextWriter(strwritter)
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", Convert.ToString("attachment;filename=") & FileName)
GridViewBillReport.GridLines = GridLines.Both
GridViewBillReport.HeaderStyle.Font.Bold = True
GridViewBillReport.RenderControl(htmltextwrtter)
Response.Write(strwritter.ToString())
Response.[End]()
End Sub
My Excel sheet and my GridView Screenshot are here:
Reply
Answers (
1
)
How to create DLL for each window form in my application ?
Biometrics integration windows application