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
degel
NA
3
0
problems exporting to xls from asp.net
Sep 25 2003 3:16 PM
has anyone encountered problems exporting datagrids to xls when using office xp as opposed to office 97? i'm using the following sub: (it works great with office 97, but blows up with office xp) Private Overloads Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnExport.Click 'export to excel Response.Clear() Response.Buffer = True Response.ContentType = "application/vnd.ms-excel" Response.Charset = "" Me.EnableViewState = False Dim oStringWriter As New System.IO.StringWriter() Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter) Me.ClearControls(dg) dg.RenderControl(oHtmlTextWriter) Response.Write(oStringWriter.ToString()) Response.End() End Sub thanks!
Reply
Answers (
2
)
Difference between Asp.net HTML controls and web controls
Change colors in datagrid